10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Greetings. I am working in a Linux environment and am trying to figure out a way to rename files in a directory by appending a unique strings that appears within a certain area in those files. I have gotten as far as identifying what that particular unique string is with a command like the... (10 Replies)
Discussion started by: HLee1981
10 Replies
2. Shell Programming and Scripting
Hi,
I have a lot of files similar to the below order. I want to rename all the files .discrading the time stamp/numbers after cnf.
Existing files
id_info_20130405.cnf_20130801
in_info_20130405.cnf_20130891
iz_info_20130405.cnf_20130821
in_info_20130405.cnf_20130818... (2 Replies)
Discussion started by: saravanapandi
2 Replies
3. Shell Programming and Scripting
I have many compressed files I want to search using awk and want to print some file contents along with the filename it came from on each output record (I simplified awk command).
Here are the results with the files uncompressed:
awk '{print FILENAME, $0}' test*.txt
test1.txt from test1... (3 Replies)
Discussion started by: mjf
3 Replies
4. Shell Programming and Scripting
Hi
I have a file with filename as "partition-setup-and-ipl.vtcmd.76217657132.9721536798"
Now i need to move this file as "partition-setup-and-ipl.vtcmd.76217657132.9721536798_org"
i tried with
# ls | grep -E "partition-setup-and-ipl.vtcmd.+"... (2 Replies)
Discussion started by: Priya Amaresh
2 Replies
5. Shell Programming and Scripting
Hi friends ,
i want to change the filename as below
filename=ABC_HYND_JDHD_20130125120345.txt
expected output : ABC_HYND_JDHD_20130125.txt
i have tried using awk but not able to procedd futher. i am trying to do the above in single commad.
echo... (3 Replies)
Discussion started by: i150371485
3 Replies
6. Shell Programming and Scripting
Hi,
I have several files with name
b1.root, b2.root b3.root
I want to rename the "b" to "bkg", so finally is should be:
bkg1.root bkg2.root bkg3.root
I used command:
rename s/b/bsig/ b*root
Somehow it is working at some place and not working in other folder. I do not have any idea... (3 Replies)
Discussion started by: nrjrasaxena
3 Replies
7. Shell Programming and Scripting
Hi all,
Wondering how this could be accomplished........
a directory contains sequentially numbered files from fw01 to fw999.
How would I insert an additional zero so that the directory lists these files in a proper manner?
(i.e. all double digit files from fw01 to fw99 would become... (3 Replies)
Discussion started by: putter1900
3 Replies
8. Shell Programming and Scripting
i have a file 4d7a94d0.bbb.1292
when i do
file 4d7a94d0.bbb.1292
the ouput is below
4d7a94d0.bbb.1292: gzip compressed data - deflate method
and i run this command
gunzip -c 4d7a94d0.bbb.1292 | awk '{gsub("\"","")}/I_ACCOUNT_ID/{print $2}' RS=":|;" FS=","
i get... (3 Replies)
Discussion started by: blackzinga80
3 Replies
9. UNIX for Dummies Questions & Answers
I compressed a file by using gzip command
gzip <<xx>>
filename changed to xx.gz
How to view this xx.gz file. Any idea.
Thanks in advance. (7 Replies)
Discussion started by: venkatesht
7 Replies
10. UNIX for Dummies Questions & Answers
I have a program that will export my data to a single file, but it assigns a file name that is overridden every time I run the program. I need to change the file name to have a sequential number in the filename.
How do I rename a file so that the filename contains the system date and time. I want... (5 Replies)
Discussion started by: wayneb
5 Replies