04-05-2008
Franklin52: et tu Brute. Please don't perpetrate this "if test $?" idiom when if already checks the value of $? by design.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I have a variable say var1 (output from somewhere, which I can't change)which store something like this:
echo $var1
name=fred
age=25
address="123 abc"
password=pass1234
how can I make the variable $name, $age, $address and $password contain the info?
I mean do this in a... (1 Reply)
Discussion started by: freddy1228
1 Replies
2. Shell Programming and Scripting
Hallo!
Example.
#!/bin/bash
BACKUP_DIR=/home/userx/backups/evolution
echo $BACKUP_DIR
# delete the first character from the string
BACKUP_DIR=$(echo $BACKUP_DIR | cut -c 2-)
echo $BACKUP_DIR
It works. It does want I want, delete the first character from string in the... (11 Replies)
Discussion started by: linuxinho
11 Replies
3. Shell Programming and Scripting
Hi ,
I want to read below output, lets called it output1.txt and each string for every line will be declare as a variables.
This is the input file
196 server_a server_unix_2 FW
196 server_b server_win_1 CD
196 server_c server_win_2 CD
196 server_bd ... (2 Replies)
Discussion started by: sQew
2 Replies
4. Shell Programming and Scripting
can anyone please help me with this:
i have written a shell script and a stored procedure which has one OUT parameter. now i want to use that out parameter as an input to the unix script but i am getting an error as variable not found. below are the unix scripts and stored procedure...
... (4 Replies)
Discussion started by: swap21783
4 Replies
5. Shell Programming and Scripting
I have two variables,
my $filename = "abc_yyyy_mm_dd.txt";
my $filename1 = " abc_2011_11_07.txt";
I need to perform some operations after checking if $filename has $filename1 in it
i have used the below code,
if($filename =~ /^$filename1/)
{
----
--
} (2 Replies)
Discussion started by: irudayaraj
2 Replies
6. Shell Programming and Scripting
I need to remove double quoted strings from specific lines in a file. The specific line numbers are a variable. For example, line 5 of the file contains
A B C "string"
I want to remove "string". The following sed command works:
sed '5 s/\"*\"//' $file
If there are multiple... (2 Replies)
Discussion started by: rennatsb
2 Replies
7. Shell Programming and Scripting
Greetings Experts,
As part of automating the sql generation, I have the source table name, target table name, join condition stored in a file join_conditions.txt which is a delimited file (I can edit the file if for any reason). The reason I needed to store is I have built SELECT list without... (5 Replies)
Discussion started by: chill3chee
5 Replies
8. Shell Programming and Scripting
Hi
I have the follwoing requirement
I have a file as follows:
# cat priy
yyy.poweroff_cmd = /sbin/poweroff
hhh.powersave-nap = 1
When this file is provided as input, I first used "awk" command and saved variables present after "="
replace=$line
replace1=`echo $line | awk -F "="... (3 Replies)
Discussion started by: Priya Amaresh
3 Replies
9. Shell Programming and Scripting
The bash bash below extracts the oldest folder from a directory and stores it in filename
That result will match a line in bold in input. In the matching line there is an_xxx digit in italics that
(once the leading zero is removed) will match a line in link. That is the lint to print in output.... (2 Replies)
Discussion started by: cmccabe
2 Replies
10. UNIX for Beginners Questions & Answers
For example: I am grepping "Hello" from a file and there are 10 matches. So all ten lines with match will get stored into a variable($match). Now I want to ignore those lines which have "Hi" present in that.
Currently I tried this: match = grep "Hello" file | grep -v "Hi" file
But that's not... (2 Replies)
Discussion started by: pavan
2 Replies
LEARN ABOUT DEBIAN
ldns-test-edns
ldns-test-edns(1) General Commands Manual ldns-test-edns(1)
NAME
ldns-test-edns - test if dns cache supports EDNS and DNSSEC.
SYNOPSIS
ldns-test-edns [ -i ] { ip }
DESCRIPTION
ldns-test-edns tests a DNS cache and checks if it supports EDNS0 and DNSSEC types so that it can be used as a dnssec-enabled DNS cache. It
sends two queries to the cache, one for the root key and one for a DS record. These must succeed, the answer must have EDNS, that type and
signatures.
If the IP address is good for DNSSEC, it is printed with 'OK'. Otherwise short description is given of the failure. If OK is given, the
cache should be good to use as a cache for a local configured DNSSEC validator.
The tool assumes the root is signed and Sweden is signed. Also, the queries are sent with the CD flag, the tool does not check that the
results are validated, but that they can be validated.
OPTIONS
-i option enables a mode where the working IP addresses are printed after another, with no other explanations, and if none work or no IP
addresses are on the input, 'off' is printed.
ldns-test-edns takes one or more IP addresses, it checks them in turn. IPv4 and IPv6 addresses can be given. The exit value is for the
last checked IP address: 0 is OK, 1 is failure, 2 is some sort of network failure.
AUTHOR
Written by the ldns team as an example for ldns usage.
REPORTING BUGS
Report bugs to <ldns-team@nlnetlabs.nl>.
COPYRIGHT
Copyright (C) 2010 NLnet Labs. This is free software. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR-
POSE.
14 Dec 2010 ldns-test-edns(1)