假設scrip的內容是如下
---------------------------------------------------------
#!/bin/sh
name=
"We Have Overcome (HM27 1989)"
rarachive=` sed -n 1p test.txt `
---------------------------------------------------------
假設txt文件的內容如下行
---------------------------------------------------------
rar a -m0 -hp123456789 -v90960b -rr3 -ep1 test.rar "$name"
---------------------------------------------------------
請問有沒有辦法從shell script裡面直接調用rarachive取得的文字(如上
rar a -m0 -hp123456789 -v90960b -rr3 -ep1 test.rar "$name")當作command line來執行,且command line中的$name需要由shell script中得自定義變數(如上
"We Have Overcome (HM27 1989)")來取得
請教大家
