On Saturday 28 July 2007 23:57, Dmitry wrote:
On Sunday 29 July 2007 03:32, Felix Miata wrote:
FM I'm having no luck figuring out why FM alias Vol='tune2fs -l $1 | grep volume' FM FM causes a usage message when 'Vol /dev/hda7' is run. Can anyone explain what FM I'm doing wrong, or provide a better method to discover a volume label?
I remember that $1 - is the first argument in bash scripts, but I don't remember how $1 works in command line. And I think it will be a good idea to try this:
By "command line," I take it you mean when the shell is interactive. The answer is essentially the same, a positional parameter or all parameters (for $* or $@) are substituted in place of the variable reference. Interactive shells usually don't have positional parameters, but they can. Just as with any other shell, they can be passed when the shell is launched or can be established (and changed) later using the "set" built-in. We've been here already:
===script====== #!/bin/bash tune2fs -l $1 | grep volume ===end script===
-- WBR, Dmitry.
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org