in reply to Error: sh: -c: line 0: unexpected EOF while looking for matching `''
sub to_sh_literal { my ($s) = @_; # Assuming bourne shell. $s =~ s/'/'\\''/g; $s = "'$s'"; return $s; }
But why are you using grep (the external tool) at all?
Update: Removed encode since file names are bytes, not text.
|
|---|