script to append data to a file
am 03.09.2003 14:08:01 von pacho baratta
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
Re: script to append data to a file
am 03.09.2003 14:19:21 von Jeff Largent
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.
-
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