Search Results

Search: Posts Made By: jawsnnn
7,280
Posted By jawsnnn
I was under the impression that the string...
I was under the impression that the string (gender) was part of your sample file.

Change the code to :

sed 's/^Male\|^Female/&*/g' file1 | awk -F'\n' '$2 ~ /^Smith/ {print}' RS='*'


For...
7,280
Posted By jawsnnn
I think the first variation should work fine for...
I think the first variation should work fine for multiple surnames. Let me explain the solution:


sed 's/(gender)/&*/g' file1 | awk -F'\n' '$2 ~ /^Smith.*/ {print}' RS='*'


1. I appended an...
7,280
Posted By jawsnnn
Can you please provide a sample input file and...
Can you please provide a sample input file and intended output file.... I am a bit confused about what you are assuming to be a record in your file.

Based on my understanding ( that a record will...
Showing results 1 to 3 of 3

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