10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Trying to use awk to print the lines in file that have either REF or SNV in $3, add a header line, sort by $4 in numerical order. The below code does that already, but where I am stuck is on the last part where the total lines are counted and printed under Total_Targets, under Targets_less_than is... (4 Replies)
Discussion started by: cmccabe
4 Replies
2. Shell Programming and Scripting
Hello, I am working with some very large files (upwards of 1M records). I have written code to parse out a lot of the data and am using awk rather than a built-in "while read LINE" for performance (I have tested both ways). That said, I now need to read each of these incoming lines, check the ninth... (2 Replies)
Discussion started by: dagamier
2 Replies
3. Shell Programming and Scripting
Hi,
I need to check whether a particular file exists ot not using awk.
Can anyone help me please?
For Example:script that i am using:
awk '{filename =$NF;
rc=(system("test -r filename")) print $rc;}' "$1"
is not working.
Here I am passing a text file as input whose last word contains a... (6 Replies)
Discussion started by: manish007
6 Replies
4. Shell Programming and Scripting
Input File1
0BB2 2A11 Split,FriApr80625,1507_7RAID5
0BF6 2829 Synchronized,FriJan140653,1507_7RAID5
0BF6 282A Split,FriApr80625,1507_7RAID5
0C7C 199E Synchronized,FriJan140653,1507_7RAID5
0C7C 1BCC Split,FriApr80625,1507_7RAID5
0DCA 0A9B ... (12 Replies)
Discussion started by: greycells
12 Replies
5. Shell Programming and Scripting
I have a file that looks like this, with the first number in each block within each SOURCE declaration being a distance.
%( PHASES
P
%)
%( SOURCES
(10,0.0)
(13,0.0)
(16,0.0)
(19,0.0)
(22,0.0)
(25,0.0)
(28,0.0)
(31,0.0)
(34,0.0)
(37,0.0) (0 Replies)
Discussion started by: kristinu
0 Replies
6. Shell Programming and Scripting
My task is that when the user calls the script
1. If user calls script with
awk -v dtmax= -v stdlim= -f ../Scripts/add-rgauss-xt.awk fin.xt > fout.xt
rgauss will return mean + (stdlim * sigma)
2. If user calls script with
awk -v dtmax= -f ../Scripts/add-rgauss-xt.awk fin.xt > fout.xt... (4 Replies)
Discussion started by: kristinu
4 Replies
7. Shell Programming and Scripting
I have following data in a file a.txt
HELLO123456789
HELLO098765432
HELLO322366565
HELLO2343435
HELLO45343
I have to filter those lines whose length is not equal to 14 using awk.
Thanks in advance:b: (1 Reply)
Discussion started by: nohup
1 Replies
8. UNIX for Dummies Questions & Answers
context:
while reading tutorial on the read command, one of the first examples, demonstrating its use, follows as such:
$ x=abc ; printf "x is now '%s'. Enter new value: " $x ; read x
generating this output:
x is now 'abc'. Enter new value:
first, what does %s represent? I know... (3 Replies)
Discussion started by: ProGrammar
3 Replies
9. Shell Programming and Scripting
Hi I'm new to this forum and I'm a beginner when it comes to shell and awk programming. But I have the following problem:
I have 5 csv files (data1.csv, data2.csv, etc.) and need to calculate the average between the total sum of the 1st and 7 column.
csv example:... (3 Replies)
Discussion started by: sapo51
3 Replies
10. Shell Programming and Scripting
Hello,
How to check if two variables( fields in awk) have the same datatype ( INTEGER , REAL, TEXT ) ? (2 Replies)
Discussion started by: scotty_123
2 Replies