Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tlug] Re: Setting a Backup Command



Charles Muller wrote:

> I would like to save this in a file that I can run as a command, like a
> BAT file in DOS. I assume then, that I would save this script in a text
> file. Then, what else should I do, in terms of naming, or other
> preparation, to have this file available as a command?

In *nix, if a text file starts with
#!foo bar
at the first line and is executable, the os will search for foo,
execute it with the parameters bar and feed it this file as input.

e.g.

#!/bin/sh
echo Hello world !

is what you are probably looking for :-)

If you really do your backup daily, you probably also want to automate
it with cron (man crontab).

-- 
Tobias								PGP: 0x9AC7E0BC


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links