10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
The bash below executes and does find all the .bam files in each R_2019 folder. However set -x shows that the .bam extension only gets removed from one .bam file in each folder (appears to be the last in each). Why is it not removing the extension from each (this is $SAMPLE)? Thank you :).
set... (4 Replies)
Discussion started by: cmccabe
4 Replies
2. Shell Programming and Scripting
Dear all
sorry for bothering you wityh dumb question but I am stucked with an issue.
Well, I am trying to loop over files in folder, make an operation and rewrite the output.
Example:
INPUT
file1.txt
file2.txt
file3.txtMy command (doesn't work!!)
for file in /path/to/*.txt
do command... (13 Replies)
Discussion started by: giuliangiuseppe
13 Replies
3. Shell Programming and Scripting
Hi all
i am new for the shell scripting can any one help me with my requirments . i want to delete file older than 21 days everything works fine but in that dir i got the files with should not be deleted with particular extension like (.info):confused:here is the script i wrote .can anyone... (5 Replies)
Discussion started by: vikatakavi
5 Replies
4. Shell Programming and Scripting
Hi,
I have files like below, In files coming as spaces. Before transfering those files into ftp server. I want to remove the spaces and then can transfer the files into unix server.
e.g: filenames are
1) SHmail _profile001_20120908.txt
2) SHmail_profile001 _20120908.txt
3) sh... (3 Replies)
Discussion started by: kirankumar
3 Replies
5. Shell Programming and Scripting
I have a filename with a bunch of periods that I want to replace with underscores, but I don't want to change the extension.
Ex: I want
file.test1.f-1.fig.eps
to be
file_test1_f-1_fig.eps
Using awk, the following line will replace ALL periods with underscores, but I want to leave the... (2 Replies)
Discussion started by: erinbot
2 Replies
6. UNIX for Dummies Questions & Answers
Hi there,
I'm pretty new to UNIX and have tried trawling through this forum to find an answer to what I want to try to do, which I'm sure is very simple but I don't know how to do it.
What I have a a folder that contains multiple files that I have copied from Windows and I want to remove the... (5 Replies)
Discussion started by: johnmcclintock
5 Replies
7. Shell Programming and Scripting
Hi,
I want to write a script to read all the filenames with extension .xml in a directory and pass the name of the file, one by one, to another function.
Please help me out.
Regards.
Saurabh (3 Replies)
Discussion started by: bhalotias
3 Replies
8. Shell Programming and Scripting
Hi ALL,
I'm new to this forum.
Thanks and congrats to all for their great efforts building this site simply superb for all unix administrators.
My requirement is to remove extensions of the files in the current directory. I'm doing it using below script which is working but i think it is... (12 Replies)
Discussion started by: prvnrk
12 Replies
9. Shell Programming and Scripting
I'm trying to put together a shell script that will append specific prefixes based on the content of filenames. I think I have this part down. However, I want to append before that part a process that will remove the current prefix before it renames the files with the new prefix.
For example,... (6 Replies)
Discussion started by: HLee1981
6 Replies
10. UNIX for Dummies Questions & Answers
Hi -
I'm stuck. I have a group of text files created using the split command. My files have the names "projectaa", "projectab", "projectac", etc. What I want to do is add the extension ".txt" to each file. I think I've got part of a sed command together, but I'm stuck on my regex - I keep getting... (9 Replies)
Discussion started by: pepintheshort
9 Replies