linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* script to append data to a file
@ 2003-09-03 12:08 pacho baratta
  2003-09-03 12:19 ` Jeff Largent
  0 siblings, 1 reply; 3+ messages in thread
From: pacho baratta @ 2003-09-03 12:08 UTC (permalink / raw)
  To: linux-admin

i run a script by cron to format some log files.here it is:

perl -pe 's/$/;/g' > / file_out

here i do a substitution of the end of line with a ";".
now i0d like to append data too, so i was wondering how to do. i tought about
command substitution but it doesn't seem to work for me, something like:

perl -pe 's/$/`date`;/g' > / file_out

what should i write to append date in my output file??

tnx, pacho



^ permalink raw reply	[flat|nested] 3+ messages in thread

* script to append data to a file
@ 2003-09-03 12:08 pacho baratta
  0 siblings, 0 replies; 3+ messages in thread
From: pacho baratta @ 2003-09-03 12:08 UTC (permalink / raw)
  To: linux-admin

i run a script by cron to format some log files.here it is:

perl -pe 's/$/;/g' > / file_out

here i do a substitution of the end of line with a ";".
now i0d like to append data too, so i was wondering how to do. i tought about
command substitution but it doesn't seem to work for me, something like:

perl -pe 's/$/`date`;/g' > / file_out

what should i write to append date in my output file??

tnx, pacho



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: script to append data to a file
  2003-09-03 12:08 script to append data to a file pacho baratta
@ 2003-09-03 12:19 ` Jeff Largent
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Largent @ 2003-09-03 12:19 UTC (permalink / raw)
  To: pacho baratta; +Cc: linux-admin

perl -pe 's/$/;/g' >> / file_out

pacho baratta wrote:
> i run a script by cron to format some log files.here it is:
> 
> perl -pe 's/$/;/g' > / file_out
> 
> here i do a substitution of the end of line with a ";".
> now i0d like to append data too, so i was wondering how to do. i tought about
> command substitution but it doesn't seem to work for me, something like:
> 
> perl -pe 's/$/`date`;/g' > / file_out
> 
> what should i write to append date in my output file??
> 
> tnx, pacho
> 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

-- 
Jeff Largent                   ImageLinks, Inc.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-09-03 12:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-03 12:08 script to append data to a file pacho baratta
2003-09-03 12:19 ` Jeff Largent
  -- strict thread matches above, loose matches on Subject: below --
2003-09-03 12:08 pacho baratta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).