Find the answer to your Linux question:
Results 1 to 3 of 3
Hi all, I am having a small query, i am giving the following command : cat /home/DTEDIT/new_build/REL8_2_4/lastrun-logs/config.log | grep -m 1 PG_VERSION | cut -d' ' -f0,4 This gives the ...
  1. #1
    Just Joined!
    Join Date
    Oct 2007
    Posts
    14

    GREP Command

    Hi all,

    I am having a small query, i am giving the following command :

    cat /home/DTEDIT/new_build/REL8_2_4/lastrun-logs/config.log | grep -m 1 PG_VERSION | cut -d' ' -f0,4

    This gives the output

    "8.2.4"

    But the output that i would require is 8.2.4 without "

    After I have got the Output of 8.2.4 I want to know what is the command that can be used to convert 8.2.4 to 8_2_4

    Please tell me what has to be done for the same.

    Thanks in advance

    Regards
    Cinu Kuriakose

  2. #2
    Just Joined!
    Join Date
    Oct 2007
    Posts
    15
    You may add to your command:
    | sed -e 's/"//g' -e 's/\./_/g'

    Valery

  3. #3
    Just Joined!
    Join Date
    Oct 2007
    Posts
    14
    Quote Originally Posted by Valery Reznic View Post
    You may add to your command:
    | sed -e 's/"//g' -e 's/\./_/g'

    Valery
    Thanks a lot Valery

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...