help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-bash] copy files w


From: Val Krem
Subject: [Help-bash] copy files w
Date: Sun, 30 Apr 2017 00:36:15 +0000 (UTC)

Hi all,

I have several files with the same  extension name(*.txt). I want to have   
copy of these files by attaching a suffix to each of the files. Example 
test1.txt should be copied to test1_new.txt. The suffix to be added in all 
files is the same. I tried using this but did not work.

ls *.txt | xargs -I {} cp {} {}_new.txt

test.txt should be test_new.txt
but I got test.txt_new.txt

what should I do to make work?

Thank you in advance


reply via email to

[Prev in Thread] Current Thread [Next in Thread]