![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help in adding positive & negative values in a column | berlin_germany | Shell Programming and Scripting | 4 | 02-09-2007 05:03 PM |
| FILE:Adding new column | sandeep_hi | Shell Programming and Scripting | 2 | 06-09-2006 09:46 AM |
| Adding a column of numbers | Khoomfire | UNIX for Advanced & Expert Users | 1 | 01-18-2006 04:55 AM |
| adding a column at the end of the record | pavan_test | UNIX for Dummies Questions & Answers | 2 | 11-07-2005 11:39 AM |
| Changing the column for a row in a text file and adding another row | aYankeeFan | Shell Programming and Scripting | 9 | 05-02-2005 09:42 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Adding a date as a first column
I want to add a date to a record which is appended to a file that gets its data from an external source. An explanation:
1. Getting external data: curl http://www.example.com/temperatures.txt 2. Getting the required record: | grep mylocation 3. Appending to file: >> mytemperatures.txt The question is not only to append the temperatures, but to add a column with the current date and time. So I need to add something like "$( date +%Y%m%d%H%M%S )" as the first column to mytemperatures.txt. How is this done? Thanks in advance |
|
||||
|
(echo -n `curl http://www.example.com/temperatures.txt | grep mylocation` ; date +param) >> mytemperatures.txt
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|