grep output into array

后端 未结 5 1326
清酒与你
清酒与你 2021-02-05 23:29

Guys How can I make this work

`find /xyz/abc/music/ |grep def`

I don\'t want to store the array in any temporary variable. How can w

5条回答
  •  野的像风
    2021-02-06 00:15

    this will work

    array_name=(`find directorypath | grep "string" | awk -F "\n" '{print $1}'`)
    echo $array_name
    

提交回复
热议问题