12-21-2011
Thanks guys for all the possible ways to do it. bunch of thanks everyone,
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How can I use a variable that has the conditions for the if statement stored in it?
my test script
condition=" || || "
if "$condition"
then echo "true"
else echo "false"
fi
output
$ ./test2.sh
./test2.sh: line 3: || || : command not found
false (2 Replies)
Discussion started by: curlee2002
2 Replies
2. Shell Programming and Scripting
Hi All,
I am trying to check if two variables have value assigned to it.
i am doing it like
if ]
then
echo "Please specify either single hostname or host file for the report"
usage
exit
fi
But its not working for it.Even i specify values for both variables it dont go... (6 Replies)
Discussion started by: kailash19
6 Replies
3. Red Hat
Urgent help with bash scripting
1- i am using grep to find a string called: tinker panic 0 in a file /etc/ntp.conf
if the string is not there, i want to add the strings in /etc/ntp.conf file in the first line of the file. if not do nothing or exit.
2- also i want to add # in front of the... (2 Replies)
Discussion started by: lamoul
2 Replies
4. UNIX for Dummies Questions & Answers
I want to check (using bash condition test function) if string contains three spaces, ignoring last three spaces at the end of string.
string_to_report='foo bar foo bar '
string_to_ignore='foo bar ' (8 Replies)
Discussion started by: useretail
8 Replies
5. Shell Programming and Scripting
In the below I can not seem to add a line that will add Not low if the statement in bold is not true or meet. I guess when the first if statement is true/meet then print low, otherwise print Not low in $(NF + 1). I am not sure how to correctly add this. Thank you :).
if(low <= $2 && $2 <=... (5 Replies)
Discussion started by: cmccabe
5 Replies
6. Shell Programming and Scripting
issue is with .txt files (7 Replies)
Discussion started by: anil529
7 Replies
7. Shell Programming and Scripting
Hi,
I need to perform the untar and rm operation if the file found is a .tar and does not have test.tar or hello.tar as the file names.
Below is the loop to check the same.
for tf in *.tar
do if ]
then found=1
... (1 Reply)
Discussion started by: mohtashims
1 Replies
8. Shell Programming and Scripting
I wrote a code to find codons in a DNA string. The only problem I have is how do I make the code only work for a file with DNA. This means the file only has the characters a,c,g,t and no white space characters. (3 Replies)
Discussion started by: germany1517
3 Replies
9. UNIX for Beginners Questions & Answers
I want get from user and pass these parameters to bash script. script should copy files in user home directory.
FYI: each file might be exist or not, might be one of them exist or four of them.
Here is my script, it always copy file1 and seems only one of them execute!
#!/bin/bash
for... (6 Replies)
Discussion started by: indeed_1
6 Replies
10. UNIX for Beginners Questions & Answers
Hi.
I wrote this small bash script, i want to compare second column from file1 with file2 if a pattern matches. Files are small and I am sure that pattern occurs only once. I think this can be rewritten into a awk one liner. Appreciate if someone could give me idea. Whole NR FNR confuse me :o
... (6 Replies)
Discussion started by: ctrld
6 Replies
LEARN ABOUT REDHAT
unlisten
UNLISTEN(7) SQL Commands UNLISTEN(7)
NAME
UNLISTEN - stop listening for a notification
SYNOPSIS
UNLISTEN { notifyname | * }
INPUTS
notifyname
Name of previously registered notify condition.
* All current listen registrations for this backend are cleared.
OUTPUTS
UNLISTEN
Acknowledgment that statement has executed.
DESCRIPTION
UNLISTEN is used to remove an existing NOTIFY registration. UNLISTEN cancels any existing registration of the current PostgreSQL session
as a listener on the notify condition notifyname. The special condition wildcard * cancels all listener registrations for the current ses-
sion.
NOTIFY [notify(7)] contains a more extensive discussion of the use of LISTEN and NOTIFY.
NOTES
notifyname need not be a valid class name but can be any string valid as a name up to 64 characters long.
The backend does not complain if you unlisten something you were not listening for. Each backend will automatically execute UNLISTEN *
when exiting.
USAGE
To subscribe to an existing registration:
LISTEN virtual;
LISTEN
NOTIFY virtual;
NOTIFY
Asynchronous NOTIFY 'virtual' from backend with pid '8448' received
Once UNLISTEN has been executed, further NOTIFY commands will be ignored:
UNLISTEN virtual;
UNLISTEN
NOTIFY virtual;
NOTIFY
-- notice no NOTIFY event is received
COMPATIBILITY
SQL92
There is no UNLISTEN in SQL92.
SQL - Language Statements 2002-11-22 UNLISTEN(7)