![]() |
|
|
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 |
| missing binary operator before token "(" | mannam srinivas | Linux | 4 | 08-07-2008 07:43 AM |
| Help need: new line operator : | satyam_sat | Shell Programming and Scripting | 3 | 04-07-2008 10:31 AM |
| Or operator with if | babom | HP-UX | 1 | 10-03-2007 04:56 PM |
| binary operator expected error | apps_user | Shell Programming and Scripting | 7 | 05-11-2007 08:33 PM |
| And operator | rcarnesiii | Shell Programming and Scripting | 4 | 08-04-2005 03:04 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Binary operator expected
Within my script, there is this following if, then statement. It basically looks for files in a directory that match a certain naming convention (bingofile*.DAT) and are non empty files and moves these files to a diff. directory. The script works okay if there is only one file matching the search criteria, but if there are multiple files, I get the following error:
./testscript2.sh: line 10: [: myfilelocationpath/temp/bingofile208847857.DAT: binary operator expected my script: if [ -s /myfilelocationpath/temp/bingofile* ] # is bingofile*.DAT > 0 then mv /myfilelocationpath/temp/bingofile* /anewdirectory/temp fi P.S: I have already tried mmv instead of mv with no luck. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|