measlog0, measlog2, measlog3, measlog4, measlog5, measlog6, measlog7, measlog8, measlog9, measlog10, measlog11.
I'd like to copy these files to different directory, using "cp" command with some regular expressions:
1. cp measlog?? /tmp/testdir
2. cp measlog*[0-9] /tmp/testdir
3. cp measlog[0-90-9] /tmp/testdir
4. for fn in measlog*
do cp $fn /tmp/testdir
done
5. cp measlog[0-9] measlog[0-9][0-9] /somedir
echo cp measlog[0-9] measlog[0-9][0-9] /somedir
cp knows nothing about regular expresions (or more accurately, filename generation) so the echo will show you what cp will see.
Reference
Subscribe to:
Post Comments (Atom)
Carlo Cipolla's Laws of Stupidity
"By creating a graph of Cipolla's two factors, we obtain four groups of people. Helpless people contribute to society but are...
-
To install pngwrite we need to install to helper library before we install pngwriter. 1. libpng 2. freetype2 We can use fink or macport to i...
-
"By creating a graph of Cipolla's two factors, we obtain four groups of people. Helpless people contribute to society but are...
-
Use 'Disk Utility' application to format the USB drive in MS-DOS (FAT) format Download the windows ISO file from the Windows websit...
No comments:
Post a Comment