10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a requirement to perform specific set of tasks based on server , So I want to have the condition(s) defined based on server. Here is the script I came up with and I have read multiple blogs and couldn`t find any mistake from my script. Can you guide on what I am overlooking here ?
... (2 Replies)
Discussion started by: Varja
2 Replies
2. Shell Programming and Scripting
Hi Team,
I have written the shell script which returns the result of the disk space filesystems which has crossed the threshold limit in HTML Format. Below mentioned is the script which worked perfectly on QA system.
df -h | awk -v host=`hostname` '
BEGIN {
print "<table border="4"... (13 Replies)
Discussion started by: Harihsun
13 Replies
3. UNIX for Beginners Questions & Answers
Hi Team,
If condition is not working properly and getting below error
# ./score1.sh
Enter your score ('q' for quit): 102
Enter your score ('q' for quit): q
./score1.sh: line 9: q: integer expression expected
Average is: 102%.
Exit.
Actual code
# Calculate the average of given... (3 Replies)
Discussion started by: Torrid
3 Replies
4. Shell Programming and Scripting
I am trying to automate a script where I need to use pbrun /bin/su but for some reason it is not passing thru the pbrun as my code below.
. ~/.bash_profile
pbrun /bin/su - content
c h 1
hpsvn up file path
I am executing this from an external .sh file that is pointing to this scripts file... (14 Replies)
Discussion started by: jorgejac
14 Replies
5. Shell Programming and Scripting
HI
My doubt may be basic one but I need to get it clarified..
When i use "if" condition that checks for many AND, OR logical conditions
like
if ]; then
return 0
fi
Even the if condition fails it returns as zero.. Any clue..
But if i add else condition like
if ]; ... (2 Replies)
Discussion started by: Priya Amaresh
2 Replies
6. Shell Programming and Scripting
hi,
I have some problems in my simple script about the redirect echo stdout command inside a condition. Why is the echo command inside the elif still execute in the else command
Here are my simple script
After check on the two diff output the echo stdout redirect is present in two diff... (3 Replies)
Discussion started by: jao_madn
3 Replies
7. HP-UX
Executed the following if conditions .. and got different results .
only (( )) gave correct o/p with all scenarios .
Can anybody please let me know what is the difference between and ] and ((condition)) when used with if condition.
And why each condition gave different result.
1.... (2 Replies)
Discussion started by: soumyabubun
2 Replies
8. Shell Programming and Scripting
Hi all,
ssh uname@remote_server 'cat /tmp/remote_file_name > home_dir/a512386/new/local_file_name'
The above given command is working fine.
but if i try to move the file only if exists in the remote server i.e) giving the same within if condition it executes but the file is not stored in my... (1 Reply)
Discussion started by: Shri123
1 Replies
9. UNIX for Advanced & Expert Users
checkSync()
{
CONNECT_STRING=TLDB61/TLDB61@TL10G
SQLPLUS_SETTINGS="SET PAGESIZE 0 LINESIZE 1500 ECHO OFF TRIMS ON TAB OFF FEEDBACK OFF HEADING OFF"
SQL_RESULT_SYNC_PMCM=`sqlplus -s ${CONNECT_STRING} << EOF
${SQLPLUS_SETTINGS}
(SELECT... (2 Replies)
Discussion started by: madfox
2 Replies
10. Shell Programming and Scripting
Hi,
I am using RHEL5.
I have following if condition.
if
In the above condition, if the value of a contains word WARNING, it should match. i.e., WARNING_MESSAGE, CRITICAL WARNING, WARNING ALERT etc. it should match.
For b, alert error, ALERT ERROR, ERROR IMMEDIATE ACTION REQUIRED, etc... (2 Replies)
Discussion started by: user7509
2 Replies