0

I have a line

MOD record for (Batch Upload Base Interest Slab Version: Online Services) Appl: GU

I need to print Batch Upload Base Interest Slab Version .

Starting string (
End string :

How do i achieve this. Pls help

4

2 回答 2

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
于 2013-06-25T11:46:47.390 回答
0

尝试这个....

$ input=(Batch Upload Base Interest Slab Version: Online Services) Appl: 
$ startString=${x#*(}
$ outputstring=${y%:*}
$ echo $outputstring
于 2013-06-25T11:47:55.903 回答