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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:41:56+00:00 2026-05-23T09:41:56+00:00

I have the below output Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda3 60300484

  • 0

I have the below output

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda3             60300484  18883824  38304156  34% /
/dev/sda1              1046516      8604   1037912   1% /boot/efi
tmpfs                  4120800         0   4120800   0% /dev/shm
psnfs1:/SDepot     629145600 400663744 228481856  64% /depot
psnfs1:/vol/ghome/ghome/support/kumar
                     1287651328 1065510400 222140928  83% /home/kumar
psnfs2:/vol/us_nhome2/us_nishome2/shaw
                     1073741888 799816192 273925696  75% /home/shaw
psnfs2:/vol/us_nhome2/us_nishome2/asimon
                     1073741888 799816192 273925696  75% /home/asimon

Where I am using (?xms)(^[/\w:]+.*?)(?=^[/\w:]+|\Z) to get each row, later i use \s to extract each column values from the prev regex output, but the problem is I also get the headings (Filesystem 1K-blocks Used Available Use% Mounted on). How can i omit them? Also explain the regex please 🙂 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-05-23T09:41:57+00:00Added an answer on May 23, 2026 at 9:41 am

    If you’re building this into a shell pipeline, it’d probably be easier to use tail(1) than building an even more complicated regex:

    $ df -k
    Filesystem           1K-blocks      Used Available Use% Mounted on
    /dev/sda3             11811504   7979960   3231544  72% /
    none                   3054508       300   3054208   1% /dev
    ...
    

    vs

    $ df -k | tail -n+2
    /dev/sda3             11811504   7979960   3231544  72% /
    none                   3054508       300   3054208   1% /dev
    none                   3061428       596   3060832   1% /dev/shm
    ...
    

    From the tail(1) manpage:

       -n, --lines=K
              output the last K lines, instead of the last 10; or
              use -n +K to output lines starting with the Kth
    

    And if it were me, I’d probably use awk(1) to get to specific columns:

    $ df -k |tail -n+2 | awk '{print $5, $6;}'
    72% /
    1% /dev
    1% /dev/shm
    1% /var/run
    0% /var/lock
    72% /var/lib/ureadahead/debugfs
    59% /boot
    34% /home
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have below code to insert a style into DOM (there is a use
I have this code which gives me the below output in firebug, so according
how can I add grep output number line by line. I have the below
I have below table in SQL server 2008.Please help to get expected output Thanks.
I have the below code, it is running however the output in the console
I have data that is organized in panels like this (see below for output
i am doing a spool of sql select output. i have the below sql
In SQL server 2008, I have select statement that spits below text output. 'text1d','text2','text3'
I have below string in javascript var output = '<?xml version=1.0 encoding=UTF-8 standalone=yes?><abc><xyz><xyzResponse><URL>http%3A%2F%2Flocalhost%3A8080%2Fnet%2Fxyz.do%3Fpartner%3Ddummy%26id%3Dba0e245f-ae67-40b6-986d-3242acea4c04</URL><StatusMsg>SUCCESS</StatusMsg><ID>hello.com</ID><AID>test</AID></xyzResponse></xyz></abc>'; I
I have a table as shown below The output from said table Green, is

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.