Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to find the meaning of: diff filename 1 filename2 | grep '^[<>]' | sed "s/^> (.*)/\1 some string/;"

Please break this down for my understanding. I know a few because, am using them but some, are just a bunch of character

share|improve this question
1  
Is this homework? – MDMarra Oct 23 '12 at 16:44
I haven't the faintest idea what this has to do with professional system/network administration. General unix questions should be asked on unix.stackexchange.com – voretaq7 Oct 23 '12 at 17:25

closed as off topic by MDMarra, mgorven, voretaq7 Oct 23 '12 at 17:25

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

1 Answer

42 is always a valid answer :p Except for that,

diff filename 1 filename2

gets the differences of the files

| grep '^[<>]'

keep only lines starting with < or >

sed "s/^> (.*)/\1 some string/;"

for details read sed's manual, but what is does is to append a string at the end of the line

share|improve this answer
what is 42. please explain – Piyush Saxena Oct 23 '12 at 16:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.