11-05-2018
Glad it helped. And, I like experimenting, so don't worry. You're welcome.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Say I write something like the following:
var1=1
var2=2
for int in 1 2
do
echo "\$var$int"
done
I want the output to be:
1
2
Instead I get something like:
$var1
$var2 (2 Replies)
Discussion started by: Awanka
2 Replies
2. Shell Programming and Scripting
This is a very crude attempt in Bash at something that I needed but didn't seem to find in the 'sleep' command. However, I would like to be able to do it without the need for the temp file. Please go easy on me if this is already possible in some other way:
How many times have you used the... (5 Replies)
Discussion started by: deckard
5 Replies
3. Shell Programming and Scripting
I'm having trouble using sed to validate the length of an entry. I want to have a user enter a phone number of either length 7, 10 or 11. Only numbers are allowed. Does anyone know how to do this? Here's the code I have so far. It only validates that numbers are entered but not the length.
... (1 Reply)
Discussion started by: snag49ers
1 Replies
4. Shell Programming and Scripting
I am having trouble parsing rpm filenames in a shell script.. I found a snippet of perl code that will perform the task but I really don't have time to rewrite the entire script in perl. I cannot for the life of me convert this code into something sed-friendly:
if ($rpm =~ /(*)-(*)-(*)\.(.*)/)... (1 Reply)
Discussion started by: suntzu
1 Replies
5. Shell Programming and Scripting
Hi
I am looking for a unix command or a small shell script which can takes one parameter and then searches for the passed in the parameter in any or all files under say /home/dev/
Can anyone please help me on this? (3 Replies)
Discussion started by: pankaj80
3 Replies
6. Shell Programming and Scripting
i am passing input parameter 'one_two' to the script , the script output should display the result as below
one_1two
one_2two
one_3two
if
then
echo " Usage : <$0> <DATABASE> "
exit 0
else
for DB in 1 2 3
do
DBname=`$DATABASE | awk -F "_" '{print $1_${DB}_$2}`
done
fi (5 Replies)
Discussion started by: only4satish
5 Replies
7. Shell Programming and Scripting
Hi,
I have the following files.
->cat scr.sh
export TMP_DIR=/home/user/folder1
export TMP_DIR_2=/home/user/folder2
while read line
do
cat "$line"
done<file_list.dat
------------------------
-> cat file_list.dat
$TMP_DIR/file1.txt
$TMP_DIR_2/file2.txt
---------------------------
-> cat... (6 Replies)
Discussion started by: barath
6 Replies
8. Shell Programming and Scripting
Hi.
How do I achieve this
sh /EDWH-DMT02/script/MISC/exec_sql.sh "@/EDWH-DMT02/script/others/CSM_CKC/Complete_List.sql ${file_name}" Complete_List.txt
The /EDWH-DMT02/script/MISC/exec_sql.sh has two parameters and it's working fine with this
sh /EDWH-DMT02/script/MISC/exec_sql.sh... (7 Replies)
Discussion started by: aimy
7 Replies
9. Shell Programming and Scripting
I'm trying to get some exclusions into our sendmail regular expression for the K command. The following configuration & regex works:
LOCAL_CONFIG
#
Kcheckaddress regex -a@MATCH
+<@+?\.++?\.(us|info|to|br|bid|cn|ru)
LOCAL_RULESETS
SLocal_check_mail
# check address against various regex... (0 Replies)
Discussion started by: RobbieTheK
0 Replies
LEARN ABOUT DEBIAN
ipsec_rangetosubnet
IPSEC_RANGETOSUBNET(3) 8 Sept 2000 IPSEC_RANGETOSUBNET(3)
NAME
ipsec_rangetosubnet - convert address range to subnet
SYNOPSIS
#include <freeswan.h>
const char *rangetosubnet(const ip_address * start, const ip_address * stop, ip_subnet * dst);
DESCRIPTION
Rangetosubnet accepts two IP addresses which define an address range, from start to stop inclusive, and converts this to a subnet if
possible. The addresses must both be IPv4 or both be IPv6, and the address family of the resulting subnet is the same.
Rangetosubnet returns NULL for success and a pointer to a string-literal error message for failure; see DIAGNOSTICS.
SEE ALSO
ipsec_initsubnet(3), ipsec_ttosubnet(3)
DIAGNOSTICS
Fatal errors in rangetosubnet are: mixed address families; unknown address family; start and stop do not define a subnet.
HISTORY
Written for the FreeS/WAN project by Henry Spencer.
BUGS
The restriction of error reports to literal strings (so that callers don't need to worry about freeing them or copying them) does limit the
precision of error reporting.
The error-reporting convention lends itself to slightly obscure code, because many readers will not think of NULL as signifying success. A
good way to make it clearer is to write something like:
const char *error;
error = rangetosubnet( /* ... */ );
if (error != NULL) {
/* something went wrong */
8 Sept 2000 11/14/2008 IPSEC_RANGETOSUBNET(3)