10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All!
Please can someone help, I have a dir with the following files:
~-rw-r--r-- 1 emmuser users 2087361 Oct 16 15:50 MPGGSN02_20131007234519_24291.20131007
-rw-r--r-- 1 emmuser users 2086837 Oct 16 15:50 MPGGSN02_20131007233529_24272.20131007
-rw-r--r-- 1 emmuser ... (7 Replies)
Discussion started by: fretagi
7 Replies
2. Shell Programming and Scripting
Hello,
I need some help with renaming some files by removing a certain portion of the filename.
The current file name is: ABC_2013186197_20130708_203556.95336
I need to remove the 5 digits after the first "_". The new file name should be:
ABC_197_20130708_203556.95336
I'm not quite... (5 Replies)
Discussion started by: bbbngowc
5 Replies
3. Shell Programming and Scripting
I am attempting to grep an exact string from a series of files within a directory and append that output to the filename when it is present in the file. I've been after this all day with no luck. Thanks for your help in advance :wall:. (4 Replies)
Discussion started by: JC_1
4 Replies
4. Shell Programming and Scripting
Hi All,
I have different type of file (.txt,.csv,.xml) format in my current directory. My requirement is that I need to remove the last character from the file format.
Example
count.txt$
csp_rules.csv^
Date.xml~
Need Output:
count.txt
csp_rules.csv
Date.xml
How to do that?.... (5 Replies)
Discussion started by: suresh01_apk
5 Replies
5. Linux
Hi all,
I have a question..
Here is my requirement..I have 500 files in a path say /a/b/c
I have some numbers in a file which are comma seperated...and I wanted to check if the numbers are present in the FileName in the path /a/b/c..if the number is there in the file that is fine..but if... (1 Reply)
Discussion started by: us_pokiri
1 Replies
6. Shell Programming and Scripting
Hi,
I have a list of paths with files at the end. How can strip off filenames.
This is what I have:
/apps/test/abc/file.txt
/apps/new/home/daily/report.xml
/apps/old/home/weekly/out/test.sh
This is what I need:
/apps/test/abc/
/apps/new/home/daily/
/apps/old/home/weekly/out/
... (10 Replies)
Discussion started by: djanu
10 Replies
7. Shell Programming and Scripting
hi
how to remove extensions of a file.. suppose i have a filename "gtk2-2.4.13-24.el4.x86_64.rpm" and i want the file name as "gtk2-2.4.13-24.el4" means want to remove last two "." extensions of a file
can anyone help me in this
thanks in advance
srik (12 Replies)
Discussion started by: srikanthg
12 Replies
8. Shell Programming and Scripting
Hi all,
Can I edit this script:
find . -type f | while read i;do && mv "$i" "${i//abc/}" ;done
so that it will not only take out abc from the filename but also take out any numbers that might be in the filename as well.
An example would be,
Input:
filename abc 2009.mov
Output:... (7 Replies)
Discussion started by: Monkey Dean
7 Replies
9. UNIX for Dummies Questions & Answers
In a foreach loop I end up with $file containing the filename INCLUDING the whole path. I want this reduced to just the filename, but I can't seem to remember how I did it some years back. I am sure I can do it with "sed", but I am pretty sure I have seen a simpler command.
Anyone?
borgeh (3 Replies)
Discussion started by: borgeh
3 Replies
10. UNIX for Dummies Questions & Answers
I've got a bunch of files called oldabc, olddef etc.
i want to copy these to be abc, def....
I can do this with file extensions....but can get the logic to work for prefixes. All the files I am interested in have a prefix of 'old'.
This loop is no good for me....it looks at the content... (2 Replies)
Discussion started by: peter.herlihy
2 Replies