Thanks for replying me Tyler. This is the part of the code in one of my script.
so If I used the AWK, that is the better option.
In your code I couldn't understand one thing. I completely new to AWK programming.
awk -F"|" -v sn="2" '$3 == sn' f10
here what is the meaning of sn & f10. Here run time I will provide the server number.
like
sh test.ksh 1
sh test.ksh 2
---------- Post updated at 08:01 AM ---------- Previous update was at 07:58 AM ----------
Thanks for reply me Agma.
I tried that option. Placing | before server number. But in this case
FWKD|FWKD_DEV|1
FWKD1|FWKD_QA|2
it will work. For below data it wont work
FWKD|FWKD_DEV|1
FWKD1|FWKD_QA|2
FWKQ|1FWKD_QA|3
---------- Post updated at 08:06 AM ---------- Previous update was at 08:01 AM ----------
Chubler.. Thanks for replying me.
I am new to AWK programming. Can I pass the parameter 1/2 while executing the script ?? will it return only one server information
> sh test.ksh 1
FWKD|FWKD_DEV|1
> sh test.ksh 2
FWKD1|FWKD_QA|2
Note : This logic I need to use it in the middle of the script
Thanks,
Chandu