10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dear Unix gurus,
I have sample data organised like this and containing 6 columns (with headers):
label c2 c3 c4 c5 c6
where c2 to c6 are numeric values in columns c2 to 6.
I am trying to create a simple output in a new file containing 3 columns:
label max(c2 c3) max(c4 c5 c6)
... (4 Replies)
Discussion started by: ksennin
4 Replies
2. Shell Programming and Scripting
Hi,
I have a text file, which I am trying to parse.
File contents:
BEG
Id Job1
Id Stage1
1
EN
Id Job2
Id Stage2
BEG
Id2 Job3
Id Stage4
2
EN
I have to process the data in this between every BEG and EN. so I am trying to restrict the range and inside every... (1 Reply)
Discussion started by: Kulasekar
1 Replies
3. Shell Programming and Scripting
Hi, I have a list.txt file with number ranges and want to print/save new all.txt file with all the numbers and between the numbers.
== list.txt ==
65936
65938
65942 && 65943
65945 ... (7 Replies)
Discussion started by: AK47
7 Replies
4. UNIX for Dummies Questions & Answers
Good day to everyone!
So, let's start :)
I have a file with a numbers in some ranges
for example:
1 10
49 72
...
and this file need to transform to:
1
2
3
4 (14 Replies)
Discussion started by: shizik
14 Replies
5. Shell Programming and Scripting
Hi! I've a file as shown below
1 hello
2 how
5 are
3 you
4 hello
5 world
Every statement consists of line numbers at the beginning which are not in sequence.
Now I want to select all the line numbers which are present between the line numbers specified by the user..
For example... (1 Reply)
Discussion started by: abk07
1 Replies
6. Shell Programming and Scripting
Hi All,
Is there a way to save a range in variable for later printing?
for example write somthing like this:
awk '
/pattern1/,/pattern2/{f=range}
/pattern3/{print f}
'
I don't know excatly what "range" could be but is there a way to do this? (8 Replies)
Discussion started by: ghoda2_10
8 Replies
7. Shell Programming and Scripting
I have a file which contains five hundred thousand lines (500,000). I want to select lines of every 1000 lines from that file using AWK. I can think something like this in bash as below:
for lines in {0..500000..1000}
do
........
........
done
But I want to use AWK. I do not know how to... (4 Replies)
Discussion started by: vjramana
4 Replies
8. Shell Programming and Scripting
Hello all,
Let's say we have this file :
$ cat inputfile
2
3
4
7
8
11
15
16
17
I'm trying to make a script with awk which gives as output the following : (4 Replies)
Discussion started by: rany1
4 Replies
9. UNIX for Dummies Questions & Answers
Hi there, I have a text file with several colums separated by "|;#" I need to search the file extracting all columns starting with the value of "1" or "2" saving in a separate file just the first 7 columns of each row maching the criteria, with replacement of the saparators in the nearly created... (2 Replies)
Discussion started by: capnino
2 Replies
10. Shell Programming and Scripting
HI all
I'm trying to write an awk script to print the min and max value in a range(s) contained in another file - the range values are in $2
EG
114,7964,1,y,y,n
114,7965,1,y,y,n
114,7966,1,y,y,n
114,7967,1,y,y,n
114,7969,1,y,y,n
114,7970,1,y,y,n
114,7971,1,y,y,n
114,7972,1,y,y,n... (3 Replies)
Discussion started by: Mudshark
3 Replies