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 am using ksh and looking for a simple way to print the entire row when a specific column contains specific infomation. I know I can use grep to find the information however I can not specify the column.
File test.txt contents:
Abc,223,223,223
efg,354,224,774
hij,354,2230,773... (5 Replies)
Discussion started by: oldman2
5 Replies
5. Shell Programming and Scripting
Hi Team,
Version : Ksh 88
The Requirement is to zip every file in a folder(which is in for loop) and move the zipped file to another folder
I tried like the below , but didn't observe any change ( Infact more size ) after the file is zipped .
#!/bin/ksh
src_dir=/home/etc/Src_dat... (5 Replies)
Discussion started by: smile689
5 Replies
6. UNIX for Dummies Questions & Answers
Hi
Please can you help how do I count the number of specific characters or words that appear in a file? (8 Replies)
Discussion started by: fretagi
8 Replies
7. Shell Programming and Scripting
Hi Friends,
I am using the following command
for i in `ls $PWD`; do cat $i > test && mv test $i; done
But, I want to execute another command and write the output to another file with different extension but same name, like this
I tried using this
for i in `ls $PWD`; do... (2 Replies)
Discussion started by: jacobs.smith
2 Replies
8. Shell Programming and Scripting
Hi Unix Experts,Team
I have a file (say comand_file.prm), The file has a command specified in column 6 (say "./execute_script.sh"). I want to execute this command in my script.
I am writing a KSH script to achieve this. Could you please assist me with this. (6 Replies)
Discussion started by: Jeevanm
6 Replies
9. Shell Programming and Scripting
Hi!
I have this shell script that I need to finish. Currently I need to fix one line to make it work. I need to change a file extension. See this code, is pretty simple.
#!/bin/sh
# Extensions
OLD_EXT=.flv
NEW_EXT=.mp4
COUNT_FILES=$(ls -l *$OLD_EXT | grep ^- | wc -l)
if ; then
... (8 Replies)
Discussion started by: pulsorock
8 Replies
10. Shell Programming and Scripting
Hi, I need some help to see if I this is posible with a while loop. I need to run a script once a day that will take all of the *.TXT files in a folder and rename them to a specific file name structure with a .dat extension. I wrote this script, but I get an error that says " line 3: too many... (2 Replies)
Discussion started by: strpwr
2 Replies