My Tech Notes
Search This Blog
Unix dirname equivalent in Windows scripting
On Linux/Unix system:
echo `dirname $0`
On Windows system:
echo %~dp0
Other Equivalents:
Unix Bash
Windows/DOS
$@
%*
all the arguments
$1, $2,$3, …
%1,%2,%3, …
argument
References:
MS-DOS CALL command help
DOS/Command Batch Scripting Quick Reference
Converting DOS Batch Files to Shell Scripts
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment