Hi All,
In my shell script programming, I created a text file that contains a number of records, and I want to delete a specific line after after locating it.
I am using the sed instruction to find the line number of the record that I want to delete it, but actually I don't know what commnd should I use to do it.
Take Note: I want to shift up all the records inside my file after deleting a specific record some where in the middle.
My sed command to locate the line no. is:
Quote:
LI_NO=$(sed -n "/192.168.8.1/=" client_ip_addresses)
|
and my text file "client_ip_addresses" contains the following records:
192.168.170.2
200.10.18.30
100.100.150.40
.
.
.
200.192.168.4
Thanks for your support in advance
Regards
Bassam