Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, the text line looks like this: Code: "test1" " " "test2" "test3" "test4" "10" "test 10 12" "00:05:58" "filename.bin" "3.3MB" "/dir/name" "18459" what's the best way to extract any ...
  1. #1
    Just Joined!
    Join Date
    Oct 2008
    Posts
    10

    Extract pattern from text line

    Hi,

    the text line looks like this:


    Code:
    "test1" " " "test2" "test3" "test4" "10" "test 10 12" "00:05:58" "filename.bin" "3.3MB" "/dir/name" "18459"
    what's the best way to extract any of it? So I can for example get only the 00:05:58 or size and so on.

    I was trying awk -F""" '{print $N}' but that didn't work.

  2. #2
    Linux Newbie
    Join Date
    Jul 2008
    Posts
    181
    Quote Originally Posted by TehOne View Post
    I was trying awk -F""" '{print $N}' but that didn't work.
    Try awk -F\" or awk -F'"' instead.

Posting Permissions

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