ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
what do you mean? start a command from input? maybe you're talking about exec. do
I've made a backup server using dar & sarab. it will backup my mailserver, fileserver and webservers sql files.
Because i want to seperate the backup for all 3 servers, I have to specify where the sarab.conf is after the basic command /usr/local/sarab/sarab.sh.
So if I only need to backup 1 server the command /usr/local/sarab/sarab.sh was enough to run the backup. For the second server, I need to specify the path of sarab.conf after the basic command.
It works if I type /usr/local/sarab/sarab.sh /etc/sarab/test/sarab.conf from the command line.
My second server will be backupped.
Now i want to put this in cron.
when I put 13 10 * * 2-6 /usr/local/sarab/sarab.sh in cron it works.
When I put 13 10 * * 2-6 /usr/local/sarab/sarab.sh /etc/sarab/test/sarab.conf it doesn't work.
that's why I thought to make a script to execute that last command and put the script in cron.
I tried to put exec in fron of the command, but that didn't work either.
echo a >/var/log/sarab
echo b >>/var/log/sarab
/usr/local/sarab/sarab.sh /etc/sarab/test/sarab.conf >/dev/null
echo c >>/var/log/sarab
there is an another option. make a duplicate copy of the /usr/local/sarab/sarab.sh then modify the replica in which /etc/sarab/test/sarab.conf is set as the default argument. run the replica afterwards. example '/usr/local/sarab/sarab2.sh
example if you have a code like this:
# change this to