Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-29-2008, 06:27 AM   #1
Registered: Sep 2008
Location: America
Distribution: Debian
Posts: 33

Rep: Reputation: 16
Question What is wrong with this diff command?

I am having trouble using the diff command correctly. I am using the following.

jb_get@jonesey:~/logs> diff  --unchanged-line-format= --new-line-format=  `find $myPath -type f -name "ip_summary-*" |sort -r |head -2` > /tmp/zGzb$$
but i keep getting this output

diff: missing operand after `--new-line-format='
diff: Try `diff --help' for more information.
Can someone tell me what I am doing wrong?

Thank you.

Last edited by Tinkster; 09-16-2010 at 12:20 PM.
Old 09-29-2008, 02:16 PM   #2
Registered: Jun 2008
Posts: 235

Rep: Reputation: 46

are you sure, that your find/sort/head pipe returns 2 pathnames? I get the error message if no files are found.

Old 10-01-2008, 08:27 AM   #3
Registered: Sep 2008
Location: America
Distribution: Debian
Posts: 33

Original Poster
Rep: Reputation: 16
I found where my problem was. When i searched for my files that were being created I was searching for "ip_summary-*" when in fact it should have been "ip_summary_*"...silly me

Thanks for the help


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question on diff command just.srad Programming 4 04-05-2008 04:01 AM
How to avoid some differences in Diff command rajbal Linux - General 3 04-10-2007 11:28 PM
How to use 'diff' command ursusman Linux - Newbie 1 03-08-2007 04:29 AM
diff command on a config file samyboy Linux - General 8 01-31-2007 02:44 AM
help on diff command anandss2004 Programming 2 11-01-2005 12:58 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:05 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration