David C. Rankin wrote:
Otto Rodusek (AP-SGP) wrote:
David C. Rankin wrote:
K.R. Foley wrote:
That doesn't make any sense. Could you post the actual code of the script? If the code is as you show it above there is no way that it lists the current directory, unless you have some kind of wierd alias for ls. Type "which ls" without the quotes to see where ls is being run from.
I agree that it doesn't make any sense. Here is the script in its entirety:
#!/bin/bash echo -e *** /usr/lib/libGL.so Config '\n' ls -al /usr/lib/libGL.so* echo -e *** /usr/lib/libIndirect Config '\n' ls -al /usr/lib/libIn* echo -e '\n' read -p "Strike and Key to See xorg.conf: " key echo -e '\n' tail -n24 /etc/X11/xorg.conf
Run it, it just shows a few config files. You will see that is produces a ls of the present directory before doing what it should. Any thoughts?
Hi,
Your script is wrong. change all your echo to (use double quotes)
echo -e "*** /usr/lib/libGL.so Config \n"
and all your probs will disappear!!
Thank you Otto,
For solving my CRI! I missed that in man bash, but I knew I had to quote the escape sequence. It was a forest for the trees issue. Also, single quotes work just fine as well.
The error is really weird. It was the result of the 'echo *' statement. Why it would interpret the *** is also just as strange.
multiple * characters in a row (without any intervening characters) are just redundant, and have no effect beyond the first * run these two commands echo * echo *** echo * is essentially ls with no arguments
--
man bash (line 2988)
echo [-neE] [arg ...] Output the args, separated by spaces, followed by a newline. The return status is always 0. If -n is specified, the trailing newline is suppressed. If the -e option is given, interpretation of the following backslash-escaped characters is enabled. The -E option disables the interpretation of these escape characters, even on systems where they are interpreted by default. The xpg_echo shell option may be used to dynamically determine whether or not echo expands these escape characters by default. echo does not interpret -- to mean the end of options. echo interprets the following escape sequences: \a alert (bell) \b backspace \c suppress trailing newline \e an escape character \f form feed \n new line \r carriage return \t horizontal tab \v vertical tab \\ backslash \0nnn the eight-bit character whose value is the octal value nnn (zero to three octal digits) \xHH the eight-bit character whose value is the hexadecimal value HH (one or two hex digits)
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org