Search Results

Search: Posts Made By: gjackson123
7,226
Posted By gjackson123
All is well again thanks to all your help
:b:Thank you so much to everyone for help out answering difficult questions (to me only) and their patience. You are my favourite Unix forums that I can turn to from now on.

Good job well done!
...
7,226
Posted By gjackson123
The Negation of union SED does not work
:)Hi,


$ awk -F\| '{print $NF}' employee1.txt | sed -n 'N;N;N;/\nSmith\n.*\n.*$/p;/\nJones\n.*\n.*$/p'
Jessica
Smith
16/09/2000
Female
Kyle
Jones
02/10/1945
Male


The negation of...
7,226
Posted By gjackson123
Sed & Awk boolean OR for more than 1 surnames
:)Hi All,

Both of the following statements provided are working:


$ awk -F\| '{print $NF}' employee1.txt | sed -n 'N;N;N;/\n[Smith]\n.*\n>
Jessica
Smith
16/09/2000
Female

$
awk...
7,226
Posted By gjackson123
Turning to SED to select specific records
:)Hi Peasant,

Thanks for weighing into this thread.

Your suggestion is the closest to what I am looking for so far. Let's have a look at the how I have applied it to the same example:

...
7,226
Posted By gjackson123
Turning to SED to select specific records
:)Hi Peasant,

Thanks for weighing into this thread.

Your suggestion is the closest to what I am looking for so far. Let's have a look at the how I have applied to the same example:


$...
7,226
Posted By gjackson123
Turning to SED to select specific records
:)Hi jawsnnn & drl,

Below is the employee.txt as requested:

$ more employee.txt
John
Barry
21/04/1988
Male
Jessica
Smith
16/09/2000
Female
Joyce
Brown
05/12/1985
Female
Kyle...
7,226
Posted By gjackson123
Turning to SED to select specific records
:)Hi jawsnnn,

Thanks for your valuable input.

There is no need to provide sample input data file since your understanding of its composition is correct as shown from this initial post....
7,226
Posted By gjackson123
Turning to SED to select specific records
Hi All,

I am looking for a simple concise solution most likely using sed to process the following 4 rows of data from the same record and only keeps it if the second record satisfy certain critea...
Showing results 1 to 8 of 8

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