Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
insert timestamp with sed
Name: Georg Date: November 29, 2002 at 06:33:41 Pacific OS: Kernle 2.4.19 CPU/Ram: PIIIm 1 GHz
Comment:
!/bin/bash cd /usr/local/httpd/htdocs/php_diplom/shop for file in *.php; do date=$(date) ; sed "s/Letzte Änderung am: **.**.****/Letzte Änderung am: $date/" $file > $file done
well, so far it works. but now i want sed to insert the "last modified date" of each $file instead of the current timestamp "date". how can i achive this ?
Summary: Hi, I am trying to do the following simple operation with sed, but it wouldnt work because sed doesn't allow me to use variables in the replace string. Anyway to do it ? testvar="TestFilename.#.txt" t...
Summary: Your sed syntax of 2s/old/new/ is asking to change first occurrence of old to new only in line 2 of the file, and that is why it works with your abbreviated file. And s/old/new/2 would change only the...
Summary: If have a sql-dump, wherein records can contain a <LF>. I want to join these "multiple line" records into 1 line. The file contains data like: B1CO38EHHRA0Z3|me_draw_tekam | 917356137|......|...| B...