please advice
what need to change in the perl syntax in order to add new empty line after the last line?
example
IP_INFO=12.23.2.1
echo IP= | perl -pe "s/$/$IP_INFO/" 1>>file
.
more file
IP=12.23.2.1 <-- last line
please advice
what need to change in the perl syntax in order to add new empty line after the last line?
example
IP_INFO=12.23.2.1
echo IP= | perl -pe "s/$/$IP_INFO/" 1>>file
.
more file
IP=12.23.2.1 <-- last line
try
echo IP= | perl -pe "s/$/$IP_INFO\n/" 1>>file
Why not just do it with another shell command?
IP_INFO=12.23.2.1
echo IP= | perl -pe "s/$/$IP_INFO/" 1>>file
echo >> file