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
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
尝试这个....
$ input=(Batch Upload Base Interest Slab Version: Online Services) Appl:
$ startString=${x#*(}
$ outputstring=${y%:*}
$ echo $outputstring