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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:45:54+00:00 2026-05-28T13:45:54+00:00

I have a command line like this: awk ‘$9 < 0.1’ s_all_frq.txt | wc

  • 0

I have a command line like this:

awk  '$9 < 0.1' s_all_frq.txt | wc -l  
awk  '$9 >= 0.1 && $9 < 0.2 ' s_all_frq.txt | wc -l

when I run it I get an output like this.

$ awk  '$9 < 0.1' s_all_frq.txt | wc -l  
63278
$awk  '$9 >= 0.1 && $9 < 0.2 ' s_all_frq.txt | wc -l  
2346

when I try to save this in a text file it always replace the first output. so I use these commands:

awk  '$9 < 0.1' s_all_frq.txt | wc -l > 1.txt 

awk  '$9 >= 0.1 &&$9 < 0.2 ' s_all_frq.txt | wc -l > 1.txt

and I get only 2346 saved on the text file. which I assume that the file got overwritten. I wonder if it’s possible to add something to this command to save the output as new line in the file so I will have this in the final file:

63278
2346
  • 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-28T13:45:55+00:00Added an answer on May 28, 2026 at 1:45 pm

    Use >> instead of > to append instead of replace.

    awk '$9 >= 0.1 &&$9 < 0.2 ' s_all_frq.txt | wc -l >> 1.txt
    

    Other example:

    user@home:~$ echo A >1.txt
    user@home:~$ echo B >1.txt
    user@home:~$ cat 1.txt
    B
    user@home:~$ echo C >>1.txt
    user@home:~$ cat 1.txt
    B
    C
    user@home:~$
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have applet which I run in command line like this: C:\Program Files (x86)\Java\jdk1.6.0_21\bin\appletviewer.exe
I have a program that I run from the command line that looks like
I usually run this program via a command line like so: java Program <TestClass.java
Say that I have simple command line application, that looks something like this #
I have a command-line process I would like to automate and capture in C#.
The (command line) interface I have in mind is like so: watching FILE+ do
I have two command line with AWK which works perfectly: awk 'NR >=2 {for
My Python script (for todo lists) is started from the command line like this:
I have used an awk command to find a particular line in a file
For security reasons (I'm a developer) I do not have command line access to

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.