2
votes
4answers
3k views

sed: extracting value of a key-value pair in a URL query string

I am trying to use sed to extract the value part of one of the many key-value pairs in a URL's query string This is what I am trying: echo 'http://www.youtube.com/watch?v=abc&g=xyz' | sed ...
1
vote
2answers
157 views

Parsing two input files and comparing line existence

I need to take two text files and check to see if a line that exists in File A doesn't exist anywhere in File B. Each line in File A that does not exist in File B should be copied to an output log. ...
4
votes
1answer
1k views

How do I parse file paths separated by a space in a string?

Background: I am working in Automator on a wrapper to a command line utility. I need a way to separate an arbitrary number of file paths delimited by a single space from a single string, so that I may ...
0
votes
2answers
125 views

lines identical except for their first word, put the first word in a variable

I have file(sudoers) in which lines can be identical except for the first word in them (different users can execute the same set of commands). I am able to extract such a line using the command: # ...