Re: -d option not working. . .?

2007-09-11 Thread Bob Proulx
Michael Williams wrote: > if [-d $i] That is not the correct syntax. The [ is a shell builtin, not a shell metacharacter. Shell metacharacters do not need to be separated by whitespace but the test program needs to be apart or it won't be parsed right. That is why you are seeing "[-d" no

-d option not working. . .?

2007-09-11 Thread Michael Williams
Hi All, I've got a script that I'm trying to set up, but it keeps telling me that "[-d command not found". Can someone please explain what is wrong with this?: #!/bin/sh for i in $* do { if [-d $i] then echo "$i is a directory! Yay!" else

Wrong input confuses bash's arithmetic unit permanently

2007-09-11 Thread Enrico Scholz
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPAC

Re: Problems with redirection of output to files through shell scripts

2007-09-11 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Pratiksha Powar on 9/11/2007 3:44 AM: > Bash Version: 3.0 > Patch Level: 16 Bash is now at 3.2 patchlevel 25. You may want to consider upgrading. > Following is the code (in a shell script)which redirects find command > output to a file

Problems with redirection of output to files through shell scripts

2007-09-11 Thread Pratiksha Powar
Configuration Information [Automatically generated, do not change]: Machine: i586 OS: linux Compiler: gcc -I/usr/src/packages/BUILD/bash-3.0 -L/usr/src/packages/BUILD/bash-3.0/../readline-5.0 Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i586' -DCONF_OSTYPE='linux' -DCONF_MACHTYPE='i586-su