I'm trying to replace text in a specific line and can't get it to work. I'm fairly new with Unix scripting. I tried searching the forum but didn't find one that fit my needs.
I have a file of transactions and the first record of the file contains a header with a date. I would like to replace the date with another date. The header starts with a '1' in the first position.
I tried using sed but that didn't work....(please don't laugh):
sed -e '/^1/s/$hdrdte/$Curr_dte/g' $file
I have a file of transactions and the first record of the file contains a header with a date. I would like to replace the date with another date. The header starts with a '1' in the first position.
I tried using sed but that didn't work....(please don't laugh):
sed -e '/^1/s/$hdrdte/$Curr_dte/g' $file