![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| diff command | ariec | AIX | 3 | 06-05-2008 04:16 AM |
| need help in diff command : | ali560045 | Shell Programming and Scripting | 5 | 05-26-2008 10:22 AM |
| diff command | Vichu | Shell Programming and Scripting | 1 | 04-28-2008 08:06 AM |
| diff command | gilead29 | UNIX for Dummies Questions & Answers | 7 | 03-09-2004 09:12 PM |
| shell scripting my own diff command | axcxe | UNIX for Dummies Questions & Answers | 4 | 12-11-2003 02:20 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Need help with Scripting diff command
Here is where I am at so far.....
------------------------- #!/bin/bash echo "Enter the output file name" read output_file echo "Enter the Orginal file Name" read write_file d= ' diff $write_file $output_file ' if $d = 1 ;then echo "files are not identical" else echo "they areidential" fi ------------------- I am not sure what I am doing wrong, and I am new at this so it could be something small.. |
|
||||
|
Maybe you want only to get the "$?" result for that matter:
#!/bin/bash echo "Enter the output file name" read output_file echo "Enter the Orginal file Name" read write_file diff $write_file $output_file > /dev/null if [ $? = 0 ];then echo "files are identical" else echo "they are not identical" fi |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|