10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
i had to split one files into 10 equally. For that i have coded below awk.
OUTPUT_FILE=/home/sit/path/Files/file_EXPORT.lst
DIR_NM=`dirname ${OUTPUT_FILE}`
awk -v CURR_DATE="$(date +'%d-%m-%Y-%H-%M')" -v pth=$DIR_NM '{print >> pth/"tgt_file_name"CURR_DATE"_"NR%10 }' ${OUTPUT_FILE}
... (7 Replies)
Discussion started by: looney
7 Replies
2. Shell Programming and Scripting
I am making a script to relocate a project file. I have all of the variables in place and everything is working except:
the first variable changes everytime it passes thru a loop. The second is a constant value.
when I run that it does what I want...but incorrectly. It is finding... (2 Replies)
Discussion started by: gentlefury
2 Replies
3. Shell Programming and Scripting
Hi friends,
Hello again :)
i got stuck in problem. Is there any way to get a special directory from directory tree?
Here is my problm.." Suppose i have one fix directory structure "/abc/xyz/pqr/"(this will be fix).Under this directory structure i have some other directory and... (6 Replies)
Discussion started by: harpal singh
6 Replies
4. Shell Programming and Scripting
Hi all,
I'm writing a script to get values from the user and replace it in another file in the same directory.
/usr/bin/sediff 's/$PROJECT/'$PROJECT'/' /ananth/TEMPLATE
TEMPLATE is the file I want to replace the variable PROJECT from the script I'm writing but Im not getting it done. Is... (4 Replies)
Discussion started by: Ananthdoss
4 Replies
5. Shell Programming and Scripting
I've been working on a UNIX script (csh) that will be starting a java application
The goal is to get the version number and location (needed by the application) from the path of the script
Example:
Location of the script= /apps/myapp/versionNum/script/start.csh
I need:... (8 Replies)
Discussion started by: brianjbrady
8 Replies
6. UNIX for Dummies Questions & Answers
Hi everyone,
I'm having trouble figuring this one out. I have ~100 *.fa files with multiple lines of fasta sequences like this: file1.fa
>xyzsequence
atcatgcacac......
ataccgagagg.....
atataccagag.....
>abcsequence
atgagatatat.....
acacacggd.....
atcgaacac....
agttccagat....
The... (2 Replies)
Discussion started by: mycoguy
2 Replies
7. Shell Programming and Scripting
Hi all:
I have a directory where all of the subdirectories are named by the convention "images_#1:#2_Date." My goal is to get an array for each subdirectory that has the structure (#1,#2, int). I am able to use awk to print each subdirectory's values, but cannot figure out how to get them into an... (6 Replies)
Discussion started by: aefskysa
6 Replies
8. Shell Programming and Scripting
Hi all,
I am trying to replace a few lines with other lines of all files in a directory which contain those few lines.
say - there are some 10 files in a dir having the same 4 lines as 1.txt at the starting
1.txt
line 1
line 2
line 3
line 4
....................................... (1 Reply)
Discussion started by: rooster005
1 Replies
9. UNIX for Advanced & Expert Users
This is my first post to this group.I am new to Unix.I have one requirement
I need to replace a text in all the files in a directory and sub-directory.Eg i have a folder structure like /usr/local/abc , inside abc i have several directories and several files. All the files inside abc and all the... (1 Reply)
Discussion started by: vatsan
1 Replies
10. Shell Programming and Scripting
I have a directory structure that contains "()". I need to recursivly replace the "(" with an "_" and remove the ")". Can I write a script to:
Read -R C:\VCE
If "(" exitsts replace with "_"
elseif ")" exists, delete. (4 Replies)
Discussion started by: tmettie
4 Replies