I need a simple script to echo current date 600 times once every second redirect it to a text file and follow the file as it grows using a tail command.
Baduizm 0 Newbie Poster
Recommended Answers
Jump to PostNeat! Do you want the date to be updated each time? In your code snippet, you run the 'date' command one time, so each entry will be the same date/time. Try something like this!
#!/bin/sh for i in $(seq 1 600); do date |tee -a outputfile sleep …
All 4 Replies
Watael 4 Junior Poster
TrustyTony 888 ex-Moderator Team Colleague Featured Poster
Baduizm 0 Newbie Poster
JeoSaurus 32 Posting Whiz in Training
Baduizm commented: Yeah +0
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.