LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   What is wrong with this diff command? (https://www.linuxquestions.org/questions/linux-newbie-8/what-is-wrong-with-this-diff-command-673051/)

jb_get 09-29-2008 06:27 AM

What is wrong with this diff command?
 
I am having trouble using the diff command correctly. I am using the following.

Code:

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

Code:

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.

jan61 09-29-2008 02:16 PM

Moin,

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

Jan

jb_get 10-01-2008 08:27 AM

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


All times are GMT -5. The time now is 09:13 PM.