shell-command

Execute shell command from within MySQL client?

In oracle database, command "host" can be used to run bash command from database command window. Is there a equivalent command as "host" in mySql? ...

Linux shell command to read/print file chunk by chunk

Hi All, Is there a standard Linux command i can use to read a file chunk by chunk? For example, i have a file whose size is 6kB. I want to read/print the first 1kB, and then the 2nd 1kB ... Seems cat/head/tail wont work in this case. Thanks very much. ...

How do I run a sudo command in Emacs?

I'm trying to create shortcut keys for some commonly used sudo shell commands (for example, having C-c s run (shell-command "sudo /etc/init.d/apache2 restart")). I tried using a straight-up shell-command call as above, but it just outputs the following to the *Shell Command Output* buffer: [sudo] password for Inaimathi: Sorry, try agai...

how to move files from one path to another path in unix using shell-script

Hi All, i want to move logs files from one path(source path) to another path(destination path). This source path and destination path is present in one text file. as:: source_path=abc/xyz source_path=pqr/abc desination_path=abcd/mlk so i read this file and stored paths in different variables.i have multiple source path so i s...

How to create required file name in unix using shell script

I am reading one property file which contains some file paths using shell script. Now depending on this file path I want to create name of zip file. Something like this...My property file contents:: path=tmp/inputs/logs/abc path=tmp/backup/inte/xyz destpath=abc/xyz Now I am able to create file name as abc.zip and xyz.zip as: paths=`g...