Hello,
I want to know is it possible to pass a block of sentence using bash.
For example,
I have a script called Test.sh that takes in $1 and $2.
and I'm calling Test.sh in a.sh
so
in a.sh
Test.sh '' 'This is a sentence'
Because block are separated by space so when I do that, I get... (6 Replies)
Hi
This is my bash script.i am calling validation.sql and passing a value to it using ${flds}.
i want the cnt variable in plsql script to be passed to unix.
LOADREC=`sqlplus -s $ORACLE_USR <<-EOF
spool $ORACLE_LOG_FILE;
echo "barani"
@validation.sql #calling the plsql script
${flds}... (6 Replies)
Hi all!
Looking for some help parsing filenames in bash. I have a directory full of files named "livingroom-110111105637.avi". The format is always date and time (yymmddhhmmss). I'm looking to parse the filenames so they are a little more easily readable. Maybe rename them to... (4 Replies)
Hi,
I am facing one issue. The awk command works fine if i hardcode the file name but if is pass it as an arguement it doesn't work. For e.g:Below commands works fine
awk -v A="$type" '{F=substr($0,23,8) "_LTD_" A ".txt"; print $0 >> F; close(F) }' RL004.txt
But the below command does not... (2 Replies)
myscript.sh
#!/bin/bash
ARGA=$1
if ; then
echo "${ARGA}:Confirmed"
else
echo "${ARGA}:Unconfirmed"
fi
when I run the above script from the command line, i run it as:
./myscript.sh jsmith
now some times, i need to runn it this way: (8 Replies)
hi,
i've bash script thats working...
but now i need to add a line....that prompts for user input....like yes and 1 as complete install....
so here's how it looks...
$ cd 9200 (cd into directory)
$./install (hv to type ./install to run install then ask for)
----do you want to... (4 Replies)
I need to cat two files with similar names. I am using the following script:
#!/bin/bash
if ]
then
file=$1
file2="${file%R1.fastq}R2.fastq"
echo fetching data from R2 file ...
sleep 3
cat $file $file2 > infile
else
echo "Input_file passed... (2 Replies)
Hello,
My question is about curl command. (ubuntu14.04)
In terminal, I am able to download my mainfile with:
curl -u user1:pass1 http://11.22.33.44/*******
When I convert it into bash script like this:
#!/bin/bash
cd /root/scripts
computer_ip=11.22.33.44
curl -u $1:$2... (8 Replies)
I can't seem to get this right. I've tried it every way imaginable using every trick I see on stackexchange and such. No luck. So nothing major here, something like:
#!/bin/bash
SEARCH="ARG1 ARG2 '((^EXACT$)|(.*InTheMiddle*)|(^AtBeginning*))'"
java -cp /my/class/path MyClassName $SEARCH... (3 Replies)
I just want to make sure I am understanding how to pass a config file to a bash script . In the below I pass to arguments to a script, then define them in the script as id and config. I then source config using ., if I understand correctly the variables in the config file can now be used by the... (11 Replies)
Discussion started by: cmccabe
11 Replies
LEARN ABOUT CENTOS
amaddclient
AMADDCLIENT(8) System Administration Commands AMADDCLIENT(8)NAME
amaddclient - program to add client to an existing Amanda configuration
SYNOPSIS
amaddclient --config config ||
--client client name ||
--diskdev directory to backup [--m] [--dumptype string] [--includefile string] [--includelist string] [--excludefile string]
[--excludelist string] [--user string] [--auth string] [--gnutar_list_dir string] [--amandates string] [--no-client-update]
[--batch] [--help]
DESCRIPTION
After Amanda rpms are successfully installed and amserverconfig is run, amaddclient will add client to the Amanda configuration.
amaddclient create or update Amanda disklist(5) file and create or update /var/lib/amanda/.amandahosts file on the server.
If --no-client-update is not specified, amaddclient will attempt to update or create /var/lib/amanda/.amandahost, amanda-client.conf and
gnutar-lists on the client. (See ssh-keygen(1) and ssh-add(1) for detail.)
amaddclient must be run by user amandabackup.
--config, --client and --diskdev must be specified.
OPTIONS
Options may be abbreviated, as long as the abbreviation is not ambiguous. Option argument can either separated by '=' or a space.
Example: --conf=v253, --client client8.zmanda.com
--config config
Amanda configuration which this program will add the client to.
--client client
The name of the client machine to add. FQDN name recommended.
--diskdev diskdev
Directory for this Amanda configuration to backup.
--m
Modify existing entry in the disklist(5) file.
Note: if disklist(5) file has been modified manually, this option might not work.
--dumptype dumptype
dumptype to use. Dumptype must be defined in /etc/amanda/template.d/dumptypes or /etc/amanda/$config/amanda.conf file. Default:
[user-tar]
--user string
name of user using amrecover on the client, default is root.
--auth string
authentication method to use when running amrecover from the client , default is bsdtcp.
--gnutar_list_dir string
directory where gnutar keep its state file on the client. Absolute path required. Default is /var/lib/amanda/gnutar-lists. If
--no-client-update is not set, this program will attempt to create the directory on the client.
--amandates string
file where amanda keep the date of each dumplevel on the client, default is /etc/amandates.
--batch
Turn on batch mode when copying files to the client, default is off
--no-client-update
If this option is set, amaddclient will not attempt to update/create .amandahosts, amanda-client.conf and gnutar-lists file on the
client.
--help
Display usage.
If any of the following four options are used, amaddclient will extend the dumptype definition to an in-line definition in the
disklist(5) file.
--includefile string
string is a glob expression
--includelist string
string is a file name on the client containing glob expressions. Specify either --includefile or --includelist.
--excludefile string
string is a glob expression
--excludelist string
string is a file name on the client containing glob expressions. Specify either --excludefile or --excludelist.
FILES
/var/lib/amanda/template.d
Amanda configuration template files install location
/var/lib/amanda
amandabackup home directory
/var/lib/amanda/.amandahosts
Amanda authentication file.
/var/lib/amanda/gnutar-lists
A directory which contains backup timestamp and list of files backed up.
/etc/amanda/$config
Amanda configuration files location for $config(e.g: DailySet1).
/etc/amanda/template.d
A directory contains dumptypes and tapetypes files used by all Amanda configurations.
/etc/amandates
Amanda file on the client. It keeps track of structures of previous dumps.
/tmp/amanda
directory contains Amanda debug log files.
RETURN VALUE
On success, zero is returned. On error, 1 is returned.
SEE ALSO amanda(8), amanda.conf(5), amserverconfig(8), ssh-keygen(1), ssh-add(1), scp(1)
The Amanda Wiki: : http://wiki.zmanda.com/
AUTHOR
Kevin Till <kevin.till@zmanda.com>
Zmanda, Inc. (http://www.zmanda.com)
Amanda 3.3.3 01/10/2013 AMADDCLIENT(8)