maxthree
02-28-2003, 03:52 PM
Hi,
Let's say I have a script that
1. assigns timestamp to a variable
timestamp=`date '+ %y-%m-%d %H:%M:%S'`
let's say that this is set to 2003-03-02 20:51:23
2. creates a file test.tmp
contents
A
B
C
D
3. now, I want to create a new file that adds $timestamp to the contents of test.tmp
A 2003-03-02 20:51:23
B 2003-03-02 20:51:23
C 2003-03-02 20:51:23
D 2003-03-02 20:51:23
how do I do that?
Let's say I have a script that
1. assigns timestamp to a variable
timestamp=`date '+ %y-%m-%d %H:%M:%S'`
let's say that this is set to 2003-03-02 20:51:23
2. creates a file test.tmp
contents
A
B
C
D
3. now, I want to create a new file that adds $timestamp to the contents of test.tmp
A 2003-03-02 20:51:23
B 2003-03-02 20:51:23
C 2003-03-02 20:51:23
D 2003-03-02 20:51:23
how do I do that?