Sheel Script

Posted on 2011-05-03
Last Modified: 2012-05-11
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


Question by:ratna1234
    LVL 40

    Expert Comment

    try this

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

    LVL 48

    Expert Comment

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

    Open in new window

    LVL 8

    Accepted Solution

    echo '[APPS1 : 130030]' | cut -f3 -d' ' | tr -d \]

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Suggested Solutions

    This Windows batch file is useful for organizing image files from a digital camera or other source, but can have many other uses.  It simply renames the file(s) to match their create date.  For example, if you took a picture today at 1:40pm and the …
    Recently, an awarded photographer, Selina De Maeyer (, completed a photo shoot of a beautiful event ( in An…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now