10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
In the bash below I am trying to create sub-directories inside a directory from files with specific .bam extensions. There may be more then one $RDIR ing the directory and the .bam file(s) are trimmed (removing the extension and IonCode_0000_) and the result is the folder name that is saved in... (2 Replies)
Discussion started by: cmccabe
2 Replies
2. Shell Programming and Scripting
Hello All,
Since i'm relatively new in shell script need your guidance.
I'm copying files manually based on a specific word in a file name and its extension and then moving it into some destination folder.
so if filename contains hyr word and it has .md and .db extension; it will move to TUM/HYR... (13 Replies)
Discussion started by: prajaktaraut
13 Replies
3. Shell Programming and Scripting
I have a specific set (all ending with .bam) of downloaded files in a directory /home/cmccabe/Desktop/NGS/API/2-15-2016. What I am trying to do is use a match to $2 in name to rename the downloaded files. To make things a more involved the date of the folder is unique and in the header of name... (1 Reply)
Discussion started by: cmccabe
1 Replies
4. Shell Programming and Scripting
I'm sure this has been asked many times, but a search didn't turn up a definitive best method for this (if there ever is such a thing).
I have been using rsync to back up my main data directory, but I have accumulated a large number of older backups that I don't need. All of the files I don't... (14 Replies)
Discussion started by: LMHmedchem
14 Replies
5. Shell Programming and Scripting
Hi
I need to remove "|" char when it's the last char of the line.
Input file:
generoso|desprendido|altruista|
abnegar|ceder|sacrificar|
abocetado-da|esbozado|
apuntado|insinuado|incompleto
abocetar|esbozar|bosquejar|
diseñar|delinear
------------------------ output need ---
... (11 Replies)
Discussion started by: lookoo
11 Replies
6. Shell Programming and Scripting
hello,
i have the below while loop wherein i am passig list of filenames to be scped. this is in unix ksh -
filenamelist.txt has list of files names, including .dat and .txt files
but i want to pass only the .txt filenames to the while loop so that only .txt files gets scped.
how can... (4 Replies)
Discussion started by: billpeter3010
4 Replies
7. Shell Programming and Scripting
Hi, I was wondering if you can help me with verifying if certain extension exists in /var/log with an if statement. Basically I'm trying to see if there is a .Gz extension in the repertory /var/log.
My code:
if ; then
echo ¨ The extension exist¨
else
echo ¨theres no extension¨
fi
... (2 Replies)
Discussion started by: Froob
2 Replies
8. Shell Programming and Scripting
Hi
#Testing for file existence
if ; then
echo 'SCHOOL data is available for processing'
else
echo 'SCHOOL DATA IS NOT AVAILABLE FOR PROCESSING'
:
i wrote a script, where it begins by checking if file exists or not.
If it exists, it truncates the database... (2 Replies)
Discussion started by: rxg
2 Replies
9. Shell Programming and Scripting
I have a file that I need to parse using a script. The dates in the file are displayed in the format:
Mar 2, 2011 9:09:31 PM
I have tried using the date command %e and %l but it pads an extra space for the day and hour if they are single digits.
So this I used a normal date command:
... (6 Replies)
Discussion started by: crazyideas
6 Replies
10. Shell Programming and Scripting
Hi All,
How do I get only the files with the .csv extension. I have a shell script something like below:
#!/usr/bin/
#Directory to scan for files
SCANDIR="/cmb/data/exstream/scriptslogs/";
LOGFILE="/cmb/data/exstream/scriptslogs/test.log";
cd $SCANDIR
for FILE in * ; do
FILENAME=$FILE... (9 Replies)
Discussion started by: janavenki
9 Replies