在shell脚本中查找日期

时间:2012-05-01 19:51:05

标签: shell

我怎样才能找到这一天&来自以下输出(示例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
************

1 个答案:

答案 0 :(得分:0)

我们会致电您的计划foo

$ IFS=$'\n' read -d! _ location day < <(foo)

$ echo $location
Main St

$ echo $day
Tuesday