dos2unix didn't work
Posted by admin
Fine, then, we'll use Perl. OUTTA THA WAY!!!!!
Remove pesky windows carriage returns:
perl -pi.bak -e 's/\r/\n/g;' ./thefile
Posted by admin
Fine, then, we'll use Perl. OUTTA THA WAY!!!!!
Remove pesky windows carriage returns:
perl -pi.bak -e 's/\r/\n/g;' ./thefile
Posted by admin
Turn a list into quoted comma separated values for a perl array:
perl -i.bak -ne 's/^(.*?)\n$/\"$1\",/;print' ./list_of_bare_strings
Oh, but your list is just a bunch of filenames you copied from the output of 'ls' and you need them one-per-line:
printf "%s\n" $(>pasted_ls_output) < list_of_bare_strings