Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi,
How can i delete the lines which ever is having **'s in a shadow file.
Thanks & Regards,
Sunil :-

Hi Sunil
Sorry for late response.
I am not sure what you wish to delete.
Anyway I want to overwrite file by removing all lines with '**'.
Try
bash#sed '/\*\*/d' sunilfile|sed 'w sunilfile'
If string is say "mystring",it would be:-
bash#sed '/mystring/d' sunilfile|sed 'w sunilfile'
CAUTION:-
1)Test it first on some dummy file
2)Never play around with passwd,shadow or group filesPlease Respond back if it was of any use.

![]() |
![]() |
![]() |
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |