Multiple files
How does one handle multiple files via most command line utilities? For
example, suppose you have a handful of perl scripts (*.pl) and you want
to save them in the same directory with a different extension. The
command
cp *.pl *.bak
complains that you're copying multiple files but the last command isn't
a directory.
Or suppose you have a series of perl scripts which are saved in DOS
line-end format. The extra ^M on the bang line causes bash not to
recognize the path to perl, and the script to fail. Sounds like a job
for sed.
sed s/^M// *.pl > *.unix
Again, the file naming criteria doesn't work. I could write a script
which essentially generates a new command for each file fitting the
naming pattern, or perhaps use find -exec but there's got to be a
straightforward way to do this on the command line. Doesn't there?
--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: