Re: [問題] 請教shellscript parse [ 1, 2 ] 中數字
※ 引述《guessi (沒)》之銘言:
: echo "x [ 12, 34 ]"|sed 's/[^0-9]/ /g'|awk '{print$1==$2?"equal":"not equal"}'
echo "asdfwer [ 1234, 3456 ]" | sed 's:[^0-9]*\([0-9]*\)[^0-9]*\([0-9]*\)[^0-9]*:\1 -eq \2:' | xargs test || echo 'not eq'
--
In heaven, all the interesting people are missing.
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 108.66.116.155
→
10/23 18:25, , 1F
10/23 18:25, 1F
推
10/24 08:11, , 2F
10/24 08:11, 2F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 5 之 5 篇):