Hi marsd,
I got the output.
To make full use of this i need to print the whole data with those numbering.
How do you print the whole content of the data file with sed.
awk uses print $0
Since i'm not familiar with sed, how do you do it. Tried using awk commands but maybe i' doing something...
Another related question. More specifix search method.
If you search a field in between Record (1) and End of Record (1)......how do you capture or display the Record #??
Let say u search CALL_ID = 00000000 and DURATION = 0005 field and u want to know which Record that actually contain this...
Thanks marsd.
It works but not perfect.
For example:-
if you enter
start:1
end:4 for sample file below
1
2
3
4
5
6
10
111
The output would come out as
1
2
3
4
10
111
It will search all the pattern with "1"
anyway, thanks for your help.
Sorry the script should look like this:-
echo "Please enter 2 fields name:"
read FILE1
read FILE2
file1=$1
awk '$1 ~ /'"$FILE1"'/' $DIR > tmp
awk '$1 ~ /'"$FILE2"'/' $DIR >> tmp
echo "Press a to display the the content between the 2 fields entered."
read...
How do awk recognize user input such as "Record (1)"??
I have a script that search an inputed fields by the user. The script search the fields and display what's in between the entered fields.
Sample data:-
Record (1) "ML_REC"
"REC_SEQ_NUMBER" =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.