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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T22:54:28+00:00 2026-06-18T22:54:28+00:00

from the doc: -Fpattern split() pattern for autosplit (-a) @ubuntu:~$ ruby -an -F -e

  • 0

from the doc:

-Fpattern split() pattern for autosplit (-a)

@ubuntu:~$ ruby -an -F -e 'puts $_;puts $_.split; puts $F[3] if /^a/'
a fdrvo hhl vgtl bbnn                             
a fdrvo hhl vgtl bbnn
a
fdrvo
hhl
vgtl
bbnn
vgtl

@ubuntu:~$ ruby -an -e 'puts $_;puts $_.split; puts $F[3] if /^a/'
aaas kgkb hv njjj jlh
aaas kgkb hv njjj jlh
aaas
kgkb
hv
njjj
jlh
njjj

As the output is same for both the code thus couldn’t understand the actual use of -F<pat> in ruby. Can anyone help me here ?

Thanks

  • 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-18T22:54:30+00:00Added an answer on June 18, 2026 at 10:54 pm

    Try this:

    @ubuntu:~$ ruby -a -n -Fp -e 'puts $_;puts $F[3]'
    apf drvoph hlpvg tlpbbpnn
    apf drvoph hlpvg tlpbbpnn
    vg tl
    
    @ubuntu:~$ ruby -a -n -e 'puts $_;puts $F[3]'
    apf drvoph hlpvg tlpbbpnn
    apf drvoph hlpvg tlpbbpnn
    tlpbbpnn
    

    The pattern after -F (‘p’ in this case) is used as the separator instead of a blank space.

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

Sidebar

Related Questions

My Ruby script is supposed to read in an XML doc from a URL
I'm having this link statement: List<UserGroup> domains = UserRepository.Instance.UserIsAdminOf(currentUser.User_ID); query = (from doc in
From MSDN doc : A delegate is a type that safely encapsulates a method,
From apple doc subview(near to the screen) gets to handle a touch event first
i don't understand this example from the doc : the timeIntervalSinceNow method should show
I'm trying to get the hello world app running from the doc . I
var cityList = from country in doc.Element(result) .Element(cities) .Descendants(city) select new { Name =
I have learned from the sencha doc how to create a simple MVC application,
Please consider the following example code (from the lm doc): ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt
I am trying to copy all format file (.txt,.pdf,.doc ...) file from source folder

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.