10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
In the portion of bash below I am using rename to match the $id variable to $file and when a match (there will alwsys be one) is found then the $id is removed from each bam and bam.bai in $file and _test is added to thee file name before the extension. Each of the variables is set correctly but... (3 Replies)
Discussion started by: cmccabe
2. Shell Programming and Scripting
In the below bash I am trying to rename eachof the 3 text files in /home/cmccabe/Desktop/percent by matching the numerical portion of each file to lines 3,4, or 5 in /home/cmccabe/Desktop/analysis.txt. There will always be a match between the files. When a match is found each text file in... (2 Replies)
Discussion started by: cmccabe
3. Shell Programming and Scripting
I have two issues.
1).I want to check if directory exists and inside that if file exists with today's date minus one. I can check directory exists but how can i check only a pattern of filename in that directory.Name of file is files-20170105-09.gz.
2).Also i want to exit immediately... (6 Replies)
Discussion started by: looney
4. Shell Programming and Scripting
I would like to extract the first portion of filename from a list of files.
The filename pattern is of the form 123456789_TEXT_TEXT_TEXT_.csv. I want to extract just the numerical portion of this filename from the list of files and then output this into another text file.
K (6 Replies)
Discussion started by: kamal_p_99
5. Shell Programming and Scripting
I have many scripts in particular directory. And few of the scripts have exit 0 in second line. Now i wanted to list out the scripts name which has the exit 0 in its second line
I tried many options , but i can not get the filename along with the nth line pattern match :mad:. Can anyone... (14 Replies)
Discussion started by: puni
6. Shell Programming and Scripting
how do I go about cutting out the first numeric characters after the word "access"?
access1005101228.merged-00.15.17.86.d8.b8.log.gz (16 Replies)
Discussion started by: GermanJulian
7. Shell Programming and Scripting
I posted something similar before but I now have a another problem.
I have filenames as below
i need to extract the dates as in bold. Using bash v 3.xx
Im trying to using the print sed command but... (11 Replies)
Discussion started by: santam
8. Shell Programming and Scripting
Lets say I have a few xml files:
The naming convention of the files is:
xxxxx_timestamp.xml OR timestamp.xml
where x can be anything
and I would like to order them by... (4 Replies)
Discussion started by: Leion
9. Shell Programming and Scripting
I am writing a BASH script. I have a list of files and I would like to make sure that each is of a specific pattern (ie *.L2). If not I would like to remove that file. How do I test whether a filename matches a given pattern?
Thanks a lot.
Mike (10 Replies)
Discussion started by: msb65
10. Shell Programming and Scripting
Any idea to identify bunch of files( gz format) in which having match PATTERN wanted and print out those files ? :)
Regards, (14 Replies)
Discussion started by: cedrichiu