Post History
Sed has more commands than just s! You can replace the first line of the input with a new value using the c command, without having to write any regular expressions. sed "1c\\$env" "$file"
Sed has more commands than just s! You can replace the first line of the input with a new value using the c command, without having to write any regular expressions. sed "1c\\$env" "$file"