Open junxnone opened 5 years ago
function parse_somethine(){ # do something return int; } parse_somethine $1 $2
$#
$*
$$
$!
$@
$-
$?
#!/bin/bash function parse_dir(){ ls $1 > tmpf.txt while read line do nname=`echo $line|awk '{ gsub(/\//,"_");print $0 }'` echo $nname cp "$line" "$2/$nname" done < tmpf.txt } parse_dir '20190805/defect1/*' dataset/defect1/
junxnone/linuxwiki#23
函数
默认参数
$#
$*
$$
$!
$@
$-
$?
Examples
copy 某处文件到指定处并以路径重命名文件
Reference