How to rename all the files in a folder having specific
extension?
Example: I have some files with extension (.txt) in a folder
name 'Test'. I have to rename all the .txt files in a test
and its subdirectories to .my extension.
Answer Posted / manuswami
for file in `ls` ; do NEW=`echo $file | sed 's/.txt/.my/g'`
; mv $file $NEW ; done
| Is This Answer Correct ? | 10 Yes | 0 No |
Post New Answer View All Answers
Calculate a real number calculation directly from the terminal and not any shell script.
What is the use of a shebang line?
Which shell is the best?
I want to connect to a remote server and execute some commands, how can I achieve this?
What is a program shell?
What does path stand for?
What is the purpose of scripting?
How do we delete all blank lines in a file?
What happens on a system call?
What is shell terminal?
What is a command line shell?
What is shell and shell script?
Is it possible to substitute "ls" command in the place of "echo" command?
What are the different types of commonly used shells on a typical linux system?
i have 2 tables 4 colums table 1 respective values a1 6, a2 8,a3 9,a4 14 & table 2 respective values a1 6, a2 8, a3 9, a4 12. if compare 2 tables 3 colums values same then 4th column values 1)Qes diff >5 then (5 * diff value ) 2)Qes diff <5 the 5 3)Qes diff 5 then 5 print respective values..