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.
mysql>GRANT SELECT, INSERT, UPDATE, DELETE
->ON widgets.* TO widgetAdmin@localhost
->IDENTIFIED BY 'ilovewidgets';
Assuming that the user widgetAdmin did not yet exist when this query is executed, both the user and db tables will be updated with the necessary rows.
The above is taken from dev.mysql.com.http://apps.facebook.com/word_jumble/
Try it out.
http://apps.facebook.com/word_jumble/
Enjoy !
mysql> RENAME TABLE users TO members;
find . -type f -exec perl -e 'rename($_, lc) || warn "$_: $!\n" for @ARGV' {} \;
# stop mysql service
/etc/init.d/mysql stop
# Start to MySQL server w/o password
mysqld_safe --skip-grant-tables &
# Connect to mysql server using mysql client
mysql -u root
# Setup new MySQL root user password
mysql> use mysql;
mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';
mysql> flush privileges;
mysql> quit
# Stop MySQL Server
/etc/init.d/mysql stop
# Start MySQL server and test it
/etc/init.d/mysql start
mysql -u root -h localhost -p
1. The session data is more secure as a potential hacker must be
able to log into the database before he can access anything.
2. The use of multiple servers would not create a problem as all
session data now resides in a single central place and is accessible
by all servers.
3. It is much easier to query the database should the site
administrator require information about current sessions or current
users.
--
Regards,
Ketan
See `man rdist` for more information about the command.
This is how I set up rdists :-)
My crontab entry
10 * * * * rdist -f $HOME/bin/rdist_file > /dev/null
###rdist_file contains
## these are comments
/path/of/source/file -> target_server1 install
-onochkowner,nochkgroup,nochkmode /path/to/the/target/file;
### file rdist ed to target_server2
/path/of/source/file -> target_server2 install
-onochkowner,nochkgroup,nochkmode /path/to/the/target/file;
% split -l 5000 file
This creates files like xaa, xab etc.
During my tenure with Fluent, I wrote many complex perl scripts and
modules. Now, I think Open Source is the field where I can help the
community and grow individually as well.