Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8342321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:44:08+00:00 2026-06-09T05:44:08+00:00

The original logfile sample: GET /dynamic_preroll_playlist.fmil?domain=13nwuc&width=480&height=360&imu=medrect&pubchannel=filmannex&ad_unit=category_2&sdk_ver=2.4.1.3&embeddedIn=http%3A%2F%2Fwww.filmannex.com%2Fmovie%2Fend-of-the-tunnel%2F20872&sdk_url=http%3A%2F%2Fstatic2.filmannex.com%2Fflash%2F& viewport=10,261,971,0,971,0,10,261 HTTP/1.1, 200, 201, 1516, 16363, http://static2.filmannex.com/flash/yume_ad_library.swf ,

  • 0

The original logfile sample:

“GET /dynamic_preroll_playlist.fmil?domain=13nwuc&width=480&height=360&imu=medrect&pubchannel=filmannex&ad_unit=category_2&sdk_ver=2.4.1.3&embeddedIn=http%3A%2F%2Fwww.filmannex.com%2Fmovie%2Fend-of-the-tunnel%2F20872&sdk_url=http%3A%2F%2Fstatic2.filmannex.com%2Fflash%2F&viewport=10,261,971,0,971,0,10,261 HTTP/1.1″, 200, 201, 1516, 16363, “http://static2.filmannex.com/flash/yume_ad_library.swf“, pl.networks.com, “Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; FunWebProducts; GTB7.3; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30618; FunWebProducts; .NET4.0C)”, “24_100_150_188_jZKFKQQjdRNM6e”, “0rO0ABXd8AAAACgAAASQAAAaLAAAGiwAAASgAAAaLAAAGiwAAAVoAAAaLAAAGiwAAAVkAAAaKAAAGiwAAAdwAAAaKAAAGiwAAAhIAAAaKAAAGiwAAAhUAAAaKAAAGiwAAAhYAAAaKAAAGiwAAAhsAAAaKAAAGiwAAAiwAAAaKAAAGiw**”, “-“, “-“, “@YD_1;233_2739”, -, “-“, “24.100.150.188”, “199.127.205.6”

The required output is the 3rd and 4th field of viewport:

971 0

I used the command:

sed -n 's/.*viewport=\([^&]*\)/\1 /p' filename

get the wrong output : 10,261,971,0,971,0,10,261** HTTP/1.1", 200, 201, 1516, 16363, ..... too much redundant info following it.

Can anyone help me with this problem? Use the sed command fetch the 3rd and 4th parameter of viewport?

Thanks so much in advance 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T05:44:09+00:00Added an answer on June 9, 2026 at 5:44 am

    Just use awk

    gawk 'match($0, /&viewport=[0-9]+,[0-9]+,([0-9]+),([0-9]+)/, m){print m[1], m[2]}'
    

    Note: Third argument to match is available only in gawk, so this script is gawk-specific.
    Explanation: we provide regex to match function, which captures third and fourth field in viewport. match returns non-zero value if provided regex can be successfully matched against some substring of whole record.
    Then it just prints captured groups.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The original logfile sample: GET /dynamic_preroll_playlist.fmil?domain=13nwuc&width=480&height=360&imu=medrect&pubchannel=filmannex&ad_unit=category_2&sdk_ver=2.4.1.3&embeddedIn=http%3A%2F%2Fwww.filmannex.com%2Fmovie%2Fend-of-the-tunnel%2F20872&sdk_url=http%3A%2F%2Fstatic2.filmannex.com%2Fflash%2F& viewport=10,261,971,0,981,10,10,261 HTTP/1.1, 200, 201, 1516, 16363, http://static2.filmannex.com/flash/yume_ad_library.swf, pl.networks.com,
Original question: Note: Below plugin pattern based on the official jQuery docs . I'm
original string is a,d,k I want to remove all , and make it to
ORIGINAL Q: I'm wondering if anyone has had experience of migrating a large Cobol/PL1
original column is like: 0.45::rafas::4.0::0.0::0.9 0.35::rasaf::4.0::110.0::1.0 and i would like to break the string
ORIGINAL (see UPDATED QUESTION below) I am designing a new laboratory database that tests
Original Question: i read that for RESTful websites. it is not good to use
Original Problem: I have 3 boxes each containing 200 coins, given that there is
[Original] I have a ListBox which has its ItemsSource (this is done in the
ORIGINAL TEXT REMOVED OK, so I found the original problem thanks to a helpful

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.