bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting "date" command output w/o linefeed


From: Reed Loefgren
Subject: Getting "date" command output w/o linefeed
Date: 26 Jul 2002 07:07:08 -0700

Is there a switch that will output the date without a linefeed? I have
a script collecting file counts, and I want a date stamp on each line
so I can send it to gnuplot, but no matter how I arrange the steps
(date, then count or count, then date), there are linefeeds/CRs that
break up the data.

For example, say I want this:

16373   Fri Jul 26 07:53:37 MDT 2002

I can get only this:

  16373
  Fri Jul 26 07:53:37 MDT 2002

echo has "-n" so I can put whitespace in anywhere, but both date and:

ls -lR /blah/blah/blah | wc -l >> somelog.txt

put in a LF/CR that "breaks" output. Is there a fix/escape
string/switch for this?


Thanks now,

rl



reply via email to

[Prev in Thread] Current Thread [Next in Thread]