Sheel Script

Hi ,
 
   Nee a script for the following.

   [APPS1 : 130030]


  I just need to print 130030 in that mesage.

  Output expected is 130030

  [APPS1 : 130030]   to be filtered to 130030

Thanks,


ratna1234Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
point_pleasantConnect With a Mentor Commented:
echo '[APPS1 : 130030]' | cut -f3 -d' ' | tr -d \]
0
 
omarfaridCommented:
try this

echo '[APPS1 : 130030]' | awk '{ print $3 }' | awk -F']' '{ print $1 }'

0
 
TintinCommented:
string='[APPS1 : 130030]'
echo "$string" | sed "s/.*: \([0-9]*\)./\1/"

Open in new window

0
All Courses

From novice to tech pro — start learning today.