Find file with same name in parent directory


/ Published in: Bash
Save to your folder(s)

Perl 1 liner to find file with same name as it parent directory


Copy this code and paste it in your HTML
  1. #!/bin/sh
  2.  
  3. perl -MFile::Find -le 'find(\&w,".");while(($n, $p)=each % file){if(@{$p}>1){print join(" ",@{$p})}} sub w{push@{$file{$_}},$file::Find::Name;}'

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.