Search Results

Search: Posts Made By: SEinT
2,998
Posted By SEinT
Many thanks
Many thanks
2,998
Posted By SEinT
Printing all lines before a specific string and a custom message 2 lines after
Hello all,

I need to print all the lines before a specific string and print a custom message 2 lines after that.

So far I have managed to print everything up the string, inclusively, but I...
2,503
Posted By SEinT
Out of curiosity, would this have worked as well?...
Out of curiosity, would this have worked as well?
awk -F'[ |]' '/^[0-9]/ {$49=$9; $50=$13; $51=$14} {print $0, $49, $50, $51}' input.txt
12,658
Posted By SEinT
Thank you
Thank you
12,658
Posted By SEinT
Yes, this is what I was trying to do. Can...
Yes, this is what I was trying to do.

Can you please break down the logic for me?
Primarily the !len ||
12,658
Posted By SEinT
This is very close. Based on one of the prior...
This is very close. Based on one of the prior code I managed to put together, the final step would be taking this output and using it in the following manner.

Theoretically speaking.
awk '!len ||...
12,658
Posted By SEinT
Find longest string and print it
Hello all,

I need to find the longest string in a select field and print that field.

I have tried a few different methods and I always end up one step from where I need to be.

Methods thus...
2,759
Posted By SEinT
Many thanks, I'll play with this a bit.
Many thanks, I'll play with this a bit.
2,759
Posted By SEinT
No, I am preparing for a technical portion of an...
No, I am preparing for a technical portion of an interview where my knowledge of nawk scripting will be tested.
2,759
Posted By SEinT
Finding longest line in a Record
Good Morning/Afternoon All,

I am using the nawk utility in korn shell to find the longest field and display that result.

My Data is as follows:

The cat ran
The elephant ran
Milly ran too...
1,208
Posted By SEinT
Thank you very much. I spent the last couple of...
Thank you very much.
I spent the last couple of hours trying to do this with a for loop :(
Many many thanks once again.
1,208
Posted By SEinT
Nawk, creating a variable total from multiple lines(records)
Good Morning/Afternoon All,

I am having some trouble creating a variable called "total" to display the sum of the values in a specific field, $6 for example.

The data I am working on is in the...
Showing results 1 to 12 of 12

 
All times are GMT -4. The time now is 11:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy