我是shell脚本编程的新手。我试图在网上搜索,但我找不到我在找的东西 - 我该如何削减一个变量才能获得我正在寻找的价值?shell脚本:如何在变量中剪切行
,比如我有:
Result=`awk -F : -v "Title=" -v "Author=" 'tolower() == tolower(Title) && tolower() == tolower(Author)' BookDB.txt`
//which will return:
//Result= Black:Hat:12.30:20:30
我已经试过这样做,但它不会工作:
PRICE= cut -d ":" -f 3 $Result
任何帮助,将不胜感激,谢谢!
谢谢@Serapheim – isme