1
vote
1answer
134 views

Delete specific line from hosts

I want to delete specific line from hosts file in my home dir: ~$ echo "193.10.1.1 localhost" >> hosts ~$ echo "127.0.0.1 localhost" >> hosts ~$ cat hosts 193.10.1.1 localhost 127.0.0.1 ...
0
votes
1answer
414 views

Perform a math operation on all numbers in a file

I have a list of pixel values in a file, and need each to be half its current value. The pattern for the value is always 123px where 123 varies drastically. How can I half each pixel value? I'm ...
1
vote
3answers
2k views

Using sed to replace text from a list of files from find

Given the following find command: find . | xargs grep 'userTools' -sl How can I use sed on the results of that command? output: ./file1.ext ./file2.ext ./file3.ext