Issue
I have several files:
test1.log
test2.log
test3.log
test.txt
test.txt contains:
./test1.log
./test2.log
./test3.log
test.txt
with
xargs -a test.txt ......
to rename
test1.log
test2.log
test3.log
to .txt files:
test1.txt
test2.txt
test3.txt
Is there a way of doing so with rename,sed,sub,or awk?
Solution
I found my answer at this link:
http://www.commandlinefu.com/commands/view/8368/bulk-rename-files-with-sed-one-liner
It isn't exactly what I wanted to do, but it works:
ls *.log | sed -e 'p;s/.log/.txt/' | xargs -n2 mv
Answered By - CalcGuy Answer Checked By - Pedro (WPSolving Volunteer)