![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| running script in cron - with ssh commands - not working | frustrated1 | Shell Programming and Scripting | 31 | 09-16-2008 11:14 AM |
| Modifying simple commands to create a script | rocinante | Shell Programming and Scripting | 8 | 06-03-2007 10:35 PM |
| Need Help Running a simple script | tony3101 | Shell Programming and Scripting | 2 | 01-21-2007 07:30 PM |
| Problem running plsql & unix commands in 1 script | siog | UNIX for Dummies Questions & Answers | 5 | 10-05-2006 11:46 AM |
| running commands from script | owijust | Shell Programming and Scripting | 2 | 01-09-2006 06:12 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
running a simple script file with multiple commands
I'm trying to run a script file with multiple commands that I would normally type into the command line. The commands are:
#!/bin/bash diff Test1.o0 /usr3/ronelso4/Desktop/verificationKPC/Test1.o0 > differences2 diff Test1a.o0 /usr3/ronelso4/Desktop/verificationKPC/Test1a.o0 >> differences2 diff Test2.o0 /usr3/ronelso4/Desktop/verificationKPC/Test2.o0 >> differences2 diff Test2a.o0 /usr3/ronelso4/Desktop/verificationKPC/Test2a.o0 >> differences2 For some reason when I execute it all I get in the file are the last files differences not all of the files. What am I doing wrong? |
|
||||
|
Hope I'm not starting with the too-obvious, but are you sure that there actually *are* any differences in the first 3 diffs? And you're sure that the diffs that are in the file are from the last diff? You could output each diff to a different file, instead of to the same file, and see what happens. Other than that, nothing looks incorrect in what you're doing. You might try:
-->
#!/bin/bash diff Test1.o0 /usr3/ronelso4/Desktop/verificationKPC/Test1.o0 > differences1 diff Test1a.o0 /usr3/ronelso4/Desktop/verificationKPC/Test1a.o0 > differences1a diff Test2.o0 /usr3/ronelso4/Desktop/verificationKPC/Test2.o0 > differences2 diff Test2a.o0 /usr3/ronelso4/Desktop/verificationKPC/Test2a.o0 > differences2a cat differences1 differences1a differences2 differences2a >> differences.all Code:
#!/bin/bash
diff Test1.o0 /usr3/ronelso4/Desktop/verificationKPC/Test1.o0 > differences1
diff Test1a.o0 /usr3/ronelso4/Desktop/verificationKPC/Test1a.o0 > differences1a
diff Test2.o0 /usr3/ronelso4/Desktop/verificationKPC/Test2.o0 > differences2
diff Test2a.o0 /usr3/ronelso4/Desktop/verificationKPC/Test2a.o0 > differences2a
cat differences1 differences1a differences2 differences2a >> differences.all
|
![]() |
| Bookmarks |
| Tags |
| basic, scripting |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|