...
Code Block | ||
---|---|---|
| ||
ls | xargs -I{} echo "mv {} {}.txt" mv file1 file1.txt mv file2 file2.txt mv file3 file3.txt |
Notice that using echo I omit the -t but you will want to put the -t back when you are actually executing your command.
Useful Applications of xargs
...