我有一行
MOD record for (Batch Upload Base Interest Slab Version: Online Services) Appl: GU
我需要打印Batch Upload Base Interest Slab Version。
Starting string (
End string :
我如何实现这一目标。请帮忙
答案 0 :(得分:1)
awk
可以成功
awk -F"[(:]" '{print $2}'
-F"[(:]"
将分隔符设置为:
或(
(快乐的脸!)。$ echo "MOD record for (Batch Upload Base Interest Slab Version: Online Services) Appl: GU" | awk -F"[:(]" '{print $2}'
Batch Upload Base Interest Slab Version
答案 1 :(得分:0)
试试这个......
$ input=(Batch Upload Base Interest Slab Version: Online Services) Appl:
$ startString=${x#*(}
$ outputstring=${y%:*}
$ echo $outputstring