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:
>
>   

Actually, $0 is the first, which contains the command used to call it. 
Then each additional item is the additional parameters from the
command.  So, if you entered "myscript a 1 here, the parameters would be:

$0 myscript
$1 a
$2 1
$3 here

You might wonder about the usefulness of $0, but remember that you can
have multiple links to the same script, but with different names.  Then
you could use that name to determine action within the script.


-- 
Use OpenOffice.org <http://www.openoffice.org>
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to