Ubuntu does not like ****
Posted:
Thu Dec 11, 2008 9:02 am
by ollie wright
When I run myscript on Ubuntu I get error messages for all the lines that only have **** .
Do I have to put a # in front of these, or is there a setup/preferences I can change?
Re: Ubuntu does not like ****
Posted:
Fri Dec 12, 2008 10:08 am
by Rich Simms
Hi Ollie,
bash will treat each * as an expansion character. **** will match all the files in your directory. You will of course get different results depending what directory you are in.
If you echo **** you will see the command bash is trying to execute. Hopefully you don't have a file named rm and all your other files in the directory named with a letter that follows r in the alphabet!
[code][rsimms@opus test]$ ls
cat words
[rsimms@opus test]$ cat words
Oops
[rsimms@opus test]$ echo *
cat words
[rsimms@opus test]$ echo ****
cat words
[rsimms@opus test]$ ****
Oops
[rsimms@opus test]$
[/code]
- Rich