03-16-2011
ctsgnb
This code doesn't work. It just hangs, with no output. I had to ctrl C out of it. I'm using Pravin27's example, it would be nice to know how the xargs works it out though.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Before I even attempt this, is it possible to grep for a pattern, maybe a partial sentence like "go to page 3", assign that to a variable and then use awk or something to pull out the 3 and assign it to a variable? So first I would have
Gotopg = "go to page 3"
then
page = 3 (9 Replies)
Discussion started by: k@ssidy
9 Replies
2. Shell Programming and Scripting
I am missing something here, I have a file which contains only one line and that is either a number or character string. I am trying to read the file and assign that value to a variable and here it seems I am missing something and not getting the expected results... Here is the code :
#!/bin/ksh... (2 Replies)
Discussion started by: Vaddadi
2 Replies
3. UNIX for Dummies Questions & Answers
HI
I have something like this in a file
ABC = 1
DEF = 2
GHI = 3
JKL = 4
MNO = 5
QRS = 6
TUV = 7
I need to assign ABC to V_abc (that is to a variable)
GHI to V_ghi (that is to another variable)
TUV to say V_tuv
... (6 Replies)
Discussion started by: ssuresh1999
6 Replies
4. Shell Programming and Scripting
Hi GUYS,
I have function. I am assigning a line count to count variable. But it is throwing an error at this line.
function_recur (){
#file being created in this function
lenth = `wc -l function_outpu.dat`;
echo $lenth;
}
this is the error i got
rec.ksh: lenth: not found.
... (3 Replies)
Discussion started by: mac4rfree
3 Replies
5. Shell Programming and Scripting
I was trying to store the number of lines in a file and store it in a file.after that i want to store the information in a file to a variable which is further used in the if loop to check certain condition.
#!/bin/bash
cat <file> | wc -l > count.txt
x="$count.txt";
i=10;
if ; then
cat... (10 Replies)
Discussion started by: sudhakaryadav
10 Replies
6. Shell Programming and Scripting
Hi,
In a script i am having trouble joining a variable to a file. for, example I read input from user as a variable a or b or c or d etc and want to join those to different files...
or
if user press a then it will open somefile.txt
if user press b then it will open otherfile.txt
any idea (4 Replies)
Discussion started by: Learnerabc
4 Replies
7. Shell Programming and Scripting
I have a file that has four values on each line and I'd like to give each column a variable name and then use those values in each step of a loop. In bash, I believe you could use a while loop to do this or possibly a cat command, but I am super new to programming and I'm having trouble decoding... (2 Replies)
Discussion started by: ccorder22
2 Replies
8. Shell Programming and Scripting
I wrote a simply perl that searched a file for a particualr value and if it found it, rite it and the next three lines to a file. Now I have been asked to check those next three lines for a different value and only write those lines if it finds the second value.
I was thinking the best way to... (1 Reply)
Discussion started by: billprice13
1 Replies
9. Shell Programming and Scripting
i have variables RECIPIENTS_DEVL,RECIPIENTS_UACC,RECIPIENTS_PROD
i have a case statement to get the phase variable:
case ${WMD_UPHASE1} in
u) WMD_UPHASE4=UACC;;
i) WMD_UPHASE4=DEVL;;
p) WMD_UPHASE4=PROD;;
d) WMD_UPHASE4=DEVL;;
*) WMD_UPHASE4=DEVL;;
esac
I am unable to... (3 Replies)
Discussion started by: Arun Mishra
3 Replies
10. Shell Programming and Scripting
Hi,
Can the below be clarified please. i just want to know what is the difference between the two ways of assigning variables as mentioned below.
export SRC_TBL=${SRC_TBL-"MMA_COPAY_PLN_FACT_STG"}
export SRC_TBL="MMA_COPAY_PLN_FACT_STG"
thanks in advance :)
Arun (1 Reply)
Discussion started by: Arun Mishra
1 Replies
LEARN ABOUT DEBIAN
backupninja.conf
BACKUPNINJA.CONF(5) backupninja package BACKUPNINJA.CONF(5)
NAME
BACKUPNINJA.CONF - Configuration file(s) for backupninja (1).
SYNOPSIS
/etc/backupninja.conf
DESCRIPTION
backupninja.conf is the general configuration file. In this file you can set the log level and change the default directory locations. You
can force a different general configuration file with "backupninja -f /path/to/conf".
OPTIONS
loglevel
How verbose to make the logs.
5 = Debugging messages
4 = Informational messages
3 = Warnings
2 = Errors
1 = Fatal errors
reportemail
Send a summary of the backup status to this email address
reportsuccess
If set to 'yes', a report email will be generated even if all modules reported success.
reportwarning
If set to 'yes', a report email will be generated even if there was no error.
logfile
The path of the logfile.
configdirectory
The directory where all the backup action configuration files live.
scriptdirectory
Where backupninja handler scripts are found
usecolors
If set to 'yes', use colors in the log file and debug output.
when When to process each configuration file. The value used here will be applied for each configuration file. It is possibile to over-
ride this "when" in each each configuration file, see also section "Scheduling" in backup.d(5).
For example:
when = sundays at 02:00
when = 30th at 22
when = 30 at 22:00
when = everyday at 01 <-- the default
when = Tuesday at 05:00
These values for 'when' are equivalent:
when = tuesday at 05:30
when = TUESDAYS at 05
These values for 'when' are invalid:
when = tuesday at 2am
when = tuesday at 2
when = tues at 02
vservers
If you are using Linux-Vservers (http://linux-vserver.org), there are some special capabilities that different handlers have to make
vserver backups easier. See the example configuration files for each handler to configure the vserver specific variables.
DEFAULTS
loglevel = 4
reportemail = root
reportsuccess = yes
reportwarning = yes
logfile = /var/log/backupninja.log
configdirectory = /etc/backup.d
scriptdirectory = /usr/share/backupninja
usecolors = yes
when = everyday at 01:00
vservers = no
SEE ALSO
backupninja(1), ninjahelper(1), backup.d(5),
AUTHOR
BACKUPNINJA was written by the riseup.net collective.
riseup November 19, 2005 BACKUPNINJA.CONF(5)