/ Published in: Bash

Perl 1 liner to find file with same name as it parent directory
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/bin/sh perl -MFile::Find -le 'find(\&w,".");while(($n, $p)=each % file){if(@{$p}>1){print join(" ",@{$p})}} sub w{push@{$file{$_}},$file::Find::Name;}'
Comments
