摘要:
file="class.cpp"name=${file%.*}ext=${file#*.}echo "name=$name, ext=$ext"Output:name=class, ext=cppif file="/proj/class.cpp", name will be "/proj/class".% - means to delete the matched pattern from right to left, it is non-greedy, %% is greedy;# - means to dele 阅读全文
posted @ 2013-01-28 17:17
name2579
阅读(577)
评论(0)
推荐(0)

浙公网安备 33010602011771号