Hi
I have a list a filename in a directory starting with particular pattern
for example:
abc_1234.txt
abc_7565.txt
abc_7676.txt
abc_7765.txt
i need to rename all these files by appending bck. or bck_
Expected output:
bck.abc_1234.txt
bck.abc_7565.txt
bck.abc_7676.txt
bck.abc_7765.txt
Can anyone suggest something regarding this.
I tried the below code but its not actually working. How to make this permanent.
but not getting the expected result.
I am using k-shell
I have a list a filename in a directory starting with particular pattern
for example:
abc_1234.txt
abc_7565.txt
abc_7676.txt
abc_7765.txt
i need to rename all these files by appending bck. or bck_
Expected output:
bck.abc_1234.txt
bck.abc_7565.txt
bck.abc_7676.txt
bck.abc_7765.txt
Can anyone suggest something regarding this.
I tried the below code but its not actually working. How to make this permanent.
Code:
ls -1 abc* | awk '{$1="bck."$1; print $1}'
I am using k-shell