Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
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

...