10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I am new to AWK and I am trying to solve a problem that is probably easy for an expert. Suppose I have the following data file input.txt:
20 35 43
20 23 54
20 62 21
20.5 43 12
20.5 33 11
20.5 89 87
21 33 20
21 22 21
21 56 87
I want to select from all lines having the... (4 Replies)
Discussion started by: naska
4 Replies
2. Shell Programming and Scripting
Hi friends,
This is sed & awk type question.
I have a text file which has numbers spread all over the file. I want to sum the series of numbers whenever i find it and produce an output file with the sum. For example
###start of input text file ####
abc
def
ghi
1
2
3
4
kjld
random... (3 Replies)
Discussion started by: kaaliakahn
3 Replies
3. Shell Programming and Scripting
Hello,
I'm trying to figure out how to use sed or awk to delete single lines in a file. By single, I mean lines that are not touching any other lines (just one line with white space above and below).
Example:
one
two
three
four
five
six
seven
eight
I want it to look like: (6 Replies)
Discussion started by: slimjbe
6 Replies
4. Shell Programming and Scripting
Hey Guys!
I have written a code which combines lots of files into one big file(.csv).
However, each of the original files had headers on the first line, and now that I've combined the files the headers are interspersed throughout the new combined data frame. For example, throughout the data... (21 Replies)
Discussion started by: gd9629
21 Replies
5. Shell Programming and Scripting
Hi,
I have one file, say file 1, that has data like below where 19900107 is the date,
19900107 12 144 129 0.7380047
19900108 12 168 129 0.3149017
19900109 12 192 129 3.2766666E-02
... (3 Replies)
Discussion started by: Wynner
3 Replies
6. Shell Programming and Scripting
Hello all,
first off great forum.
Now for my little problem.
Using RHEL 5.4 and awk. Been doing code since a few month. So just starting.
My problem is handeling data on multiple lines.
{
if ($1 != LASTKEY && h ~ /.*\/s_fr_/) {
checkgecos( h, h )
h=""
... (2 Replies)
Discussion started by: maverick72
2 Replies
7. Shell Programming and Scripting
Hey All,
I need to reorganize a file's text. Here is the source:
host John_Doe
filename "config.cfg";
hardware ethernet 98:10:3d:13:8f:98;
fixed-address 10.10.10.29;
}
host Jane_Doe
filename "config.cfg";
hardware ethernet 98:13:11:fd:5a:57;
fixed-address 10.10.5.24;
}
host... (2 Replies)
Discussion started by: TheBigAmbulance
2 Replies
8. Shell Programming and Scripting
Hi guys,
i have a problem which im hoping you will be able to help me with.
I have follwing output :-
-------------------------------------------------------------------------------
NSTEP = 407000 TIME(PS) = 43059.000 TEMP(K) = 288.46 PRESS = 0.0
Etot = -2077.4322 ... (2 Replies)
Discussion started by: Mish_99
2 Replies
9. Shell Programming and Scripting
Hello all and thanks in advance!
What I'm looking to do is insert a blank line, anytime the first 9 characters of a given line don't match the first 9 characters of the previous line.
i.e.
Convert the data set
1 45 64 89
1 89 69 235
2 89 234 67
2 56 90... (1 Reply)
Discussion started by: selkirk
1 Replies
10. Shell Programming and Scripting
Gurus,
I am struggling with a issue and thought I could use some of your expertise.
Need Help with this
I have a flat file that has millions of records
24|john|account ~ info |56|
25|kuo|account ~ journal |58|
27|kim|account ~ journal |59|
28|San|account ~
journal |60|... (3 Replies)
Discussion started by: rimss
3 Replies