Difference between revisions of "$scriptline"
From Scriptwiki
m (also forgot category) |
|||
Line 14: | Line 14: | ||
== See Also == | == See Also == | ||
* [[$script]] Remote script currently being executed. | * [[$script]] Remote script currently being executed. | ||
+ | |||
+ | [[Category:Remote Identifiers]] |
Latest revision as of 21:11, 6 April 2008
Returns line number in current script.
$scriptline
Example
alias SecureMinus { if ($1 !isnum) echo -ag Error on line $scriptline $!1 isn't a number. if ($2 !isnum) echo -ag Error on line $scriptline $!2 isn't a number. if ($2 > $1) echo -ag Error on line $scriptline $!2 is greater than $!1 if ($3 != MyPassword) echo -ag Incorrect password on line $scriptline else echo -ag $calc($1 - $2) }
In the above alias if $1 or $2 is not a number, or $2 is greater than $1 or $3 does not equal MyPassword, it lets you know what line in the script file where it has failed.
See Also
- $script Remote script currently being executed.