Breaking it down
- ‘sed’ – the stream editor
$ cat file | sed 's/kg/kilograms/g' > new-file
- Input
at least 15 kg of marmite
- Output
at least 15 kilograms of marmite
$ cat file | sed 's/kg/kilograms/g' > new-file
at least 15 kg of marmite
at least 15 kilograms of marmite