10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have files named with different prefixes. From each I want to extract the first line containing a specific string, and then print that line along with the prefix.
I've tried to do this with a while loop, but instead of printing the prefix I print the first line of the file twice.
Files:... (3 Replies)
Discussion started by: pathunkathunk
3 Replies
2. Shell Programming and Scripting
I have two files that I am going to use diff to find the differences but need to parse them before I do that. I have include the format of each file1 and file2 with the desired output of each (the first 5 fields in each file). The first file has a "chr" before the # that needs to be removed. I... (1 Reply)
Discussion started by: cmccabe
1 Replies
3. Shell Programming and Scripting
Dear Friends,
I am looking for a shell script to merge input files into one file .. here is my idea:
1st paramter would be outfile file (all input files content)
read all input files and merge them to input param 1
ex: if I pass 6 file names to the script then 1st file name as output file... (4 Replies)
Discussion started by: hyd1234
4 Replies
4. Shell Programming and Scripting
Hi All,
Do we know how to read input file within awk script and send output toanother log file. All this needs to be in awk script, not in command line. I am running this awk through crontab.
Cat my.awk
#!/bin/awk -f
function test(var){
some code}
{
}
END
{
print"test code"
} (5 Replies)
Discussion started by: random_thoughts
5 Replies
5. Shell Programming and Scripting
Hi ,
i have two input files one is input.gz and another is ( input.txt) text file.in gz format input file each record contains 10 fields and corresponding header value is present in the text file as a single record i.e text file contains only 10 records which is header value,so output of the awk... (1 Reply)
Discussion started by: Ajoy
1 Replies
6. Shell Programming and Scripting
I have a directory where i have *.sas; *.pl;*.sh and *.c scripts
I need to find out what are the child scripts and input output files for each script:
say I have a shell script which calls a perl script and a sas script:
In my first line I want
I a) the parent script name;
b) the... (1 Reply)
Discussion started by: ramky79
1 Replies
7. Shell Programming and Scripting
Compare 2 files and print the values input1 (c1 20 100 X_y10) along with one closest highest (c1 100 200 X_y10) and one lowest values (c1 10 15 X_y10) from input2
input1
c1 20 100 X_y10
input2
c1 5 10 X_y10
c1 10 15 X_y10
c1 100 200 X_y10
c1 200 300 X_y10
output
... (8 Replies)
Discussion started by: bumblebee_2010
8 Replies
8. Shell Programming and Scripting
Hi,
I needs to split *.txt files from single directory depends on the some mutltiple input values. i have wrote the code like below
for file in *.txt
do
grep -i -h "value1|value2" $file > $file;
done.
My requirment is more input values needs to be given in grep; let us say 50... (3 Replies)
Discussion started by: arund_01
3 Replies
9. Shell Programming and Scripting
Hi Frnz
Please help me out.
I have two text files.
A.txt
one
two
three
four
B.txt
Jan
Feb
Mar
Apr
I need the output as (1 Reply)
Discussion started by: sriram.s
1 Replies
10. Shell Programming and Scripting
Hi,
i have 2 files like f1 and f2
f1:
1
Note: some times it will be cahnged to 2 and 3.
f2:
1:20
2:30
4:50
6:70
8:90
3:20
1:30
1:40
output:
1:80
(sum of 1) (6 Replies)
Discussion started by: koti_rama
6 Replies