You could do this with in-place edition:
#perl -i.bak -pe 's/1\.1\.1\.1 hostname FQDN\n//g' /etc/hosts
hth,
PooLpi
In reply to Re: deleting a non-numeric scalar within array
by poolpi
in thread deleting a non-numeric scalar within array
by pipeops
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |