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 8977459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:22:36+00:00 2026-06-15T19:22:36+00:00

i get user agent information like below in a log file. Mozilla/5.0 (compatible; MSIE

  • 0

i get user agent information like below in a log file.

Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)
Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11)
Mozilla/5.0 (iPad; CPU OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B206 Safari/7534.48.3)
Mozilla/5.0 (Windows NT 6.1; rv:16.0) Gecko/20100101 Firefox/16.0)
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.28) Gecko/20120306 Firefox/3.6.28

i would like to get OS and browser information from each user agent. Please suggest me how we can achieve this in shell script(AIX).

  • 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-15T19:22:37+00:00Added an answer on June 15, 2026 at 7:22 pm

    Use case:

    case $user_agent in
      *MSIE*) browser=MSIE ;;
      *Chrome*) browser=Chrome ;;
      ....
      *) echo "Cannot extract browser from [[$user_agent]]" >2 ;;
    esac
    case $user_agent in
      *Windows*) plarform=Windows ;;
      *Linux*) platform=Linux ;;
      ....
      *) echo "Cannot extract platform from [[$user_agent]]" >2 ;;
    esac
    

    You will have to go through a few iterations adding cases for various browsers (there is no uniformity there).

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

Sidebar

Related Questions

I get this error: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows
I have a user agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET
I need to get data from xml file <?xml version=1.0?> <xml> <User> <Agent> <id>cr4523</id>
Getting the information from the HTTP User-Agent header using navigator.userAgent in JavaScript we get
I'd like to get access to the public information about any user on Facebook.
Example: <!--[if IE 6]>You suck!<![endif]--> Does it get its information from the user-agent?
I'm trying to get access to the user agent with Flask, but I either
I know I can get the user ip: $_SERVER['HTTP_CLIENT_IP']; the user user's agent: $_SERVER['HTTP_USER_AGENT'];
I get user input including non-ASCII characters and non-printable characters, such as \xc2d \xa0
I basically need to get user input: gets.chomp(input?) And then to convert the given

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.