piping output of list to cp
Hi
I have the following code Code:
ls ~/ | grep ^[[:lower:]] /Andy |
Even if it's ugly, and if you have no space in filenames you can do something like this
Code:
|
But if there are spaces in filenames? Hos do i handle thore?
/Andy |
You should almost never need to use ls to get a list of files. Bash has excellent globbing ability, and can do almost everything you need. Particularly when you use extended globbing patterns.
Code:
cp [[:lower:]]* targetdirectory |
All times are GMT -5. The time now is 05:59 AM. |