我怎样才能找到这一天&来自以下输出(示例1和2)的位置,并使用Shell脚本存储在文件或变量中。位置是固定的。
Address can have the following location and days. Location to choose from: ABC St, Main St, Ridge Pike Days to choose from: Monday,Tuesday,Wednesday, Thursday, Friday
Output Sample - 1 *********** Order-101 Main St Tuesday ************
Output Sample - 2 *********** Order-110 Ridge Pike Friday ************
答案 0 :(得分:0)
我们会致电您的计划foo
$ IFS=$'\n' read -d! _ location day < <(foo)
$ echo $location
Main St
$ echo $day
Tuesday