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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:34:33+00:00 2026-06-10T12:34:33+00:00

Normally I use something like this for processes I run on my servers ./runEvilProcess.sh

  • 0

Normally I use something like this for processes I run on my servers

./runEvilProcess.sh >> ./evilProcess.log

However I’m currently using Doxygen and it produces lots of duplicate output

Example output:

QGDict::hashAsciiKey: Invalid null key
QGDict::hashAsciiKey: Invalid null key
QGDict::hashAsciiKey: Invalid null key

So you end up with a very messy log

Is there a way I can only add the line to the log file if the line wasn’t the last one added.

A poor example (but not sure how to do in bash)

$previousLine = ""
$outputLine = getNextLine()
if($previousLine != $outputLine) {
  $outputLine >> logfile.log
  $previousLine = $outputLine
}
  • 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-10T12:34:35+00:00Added an answer on June 10, 2026 at 12:34 pm

    If the process returns duplicate lines in a row, pipe the output of your process through uniq:

     $ ./t.sh 
    one
    one
    two
    two
    two
    one
    one
     $ ./t.sh | uniq
    one
    two
    one
    

    If the logs are sent to the standard error stream, you’ll need to redirect that too:

     $ ./yourprog 2>&1 | uniq >> logfile
    

    (This won’t help if the duplicates come from multiple runs of the program – but then you can pipe your log file through uniq when reviewing it.)

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

Sidebar

Related Questions

Normally the code for using the dbContext from Entity Framework looks something like this:
Normally I would do something like this: <select name=myselect> <option value=opt1 <?=($_POST['myselect']==opt1?SELECTED:)?>>Option 1</option> <option
I have this code that where I would normally use one line: if (tableView
Looking to create an inline array in Visual Basic for Applications Something like this
Normally, I can use this , in the callback function: $this->form_validation->set_message(_custom, My custom message.);
TL;DR - how can I use something like improved_markdown :some_file to do custom rendering,
I would like to write simple scripts in C#. Stuff I would normally use
http://jsfiddle.net/jENDR/3/ Something like this var test = {a: 'a', b: 'b'}; var test2 =
I normally use gVim for editing, but I sometimes use vim when remotely connecting
I normally use the following code in SQL Server: IF EXISTS (SELECT * FROM

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.