How to in linux sh insert argv argument?
I programming a small in开发者_JAVA技巧stallation program in sh, and I do not know how then argv argument.
Something like this?
#!/bin/sh
Dosomething $1 $2
In bash, command line arguments are retrieved in $1, $2, $3, ... variables. This is true both for scripts and for functions inside scripts.
man bash
is worth a read.
精彩评论