![]() |
Do this
here is the solution I use.
instead of ls *.txt add a slash: \ls *.txt it appears that ls is alaised somehow to run through a formatter. Using the slash causes it to use the unaliased generic ls. |
Quote:
or something that you installed. |
Quote:
I knew about the "command" command (for bypassing shell builtins and/or user-defined functions in scripts). But why does the \backslash work? Doesn't appear to be a keyword... $ type \ > [^C] $ type \\ -bash: type: \: not found $ type '\' -bash: type: \: not found -- Hmm, apparently the \ has the same effect as *quoting* the text. So, typing... 'ls' would have the same effect: bypass the alias and run the standard utility. Still not clear why that works tho. |
The page http://www.chiark.greenend.org.uk/~s...m/aliases.html (about special uses of aliases) explains:
Quote:
|
Interesting page!
I can relate to his "find" example there. For a few scripts, i've even used this heading: #!/bin/bash -f - to kill globbing within the whole script... so that stuff like "*.txt" can be passed to internal functions without expanding (if something in the cwd happened to match). |
| All times are GMT -5. The time now is 10:17 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.