开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜