You have $yr=2008
You want to obtain something like 2008_data.csv etc
$yr_data.csv does not work
The solution - Use curly braces to separate variables from strings
like this
${yr}_data.csv
This blog has content related to Linux, Apache, MySQL, PHP, Perl, CSS, JavaScript and Free software/open source.
You have $yr=2008
You want to obtain something like 2008_data.csv etc
$yr_data.csv does not work
The solution - Use curly braces to separate variables from strings
like this
${yr}_data.csv
Become root, save hostname in /etc/hostname and tell the hostname
command to read the name from the file.
Here are the commands to do the same
% su
% echo your_hostname > /etc/hostname
% hostname -F /etc/hostname
However, on next reboot, hostname will be lost.
On Red Hat / centOS, edit HOSTNAME= entry of the file
/etc/sysconfig/network
This sets up the hostname permanently.