Hi all,
I plan to write a shell script to inform users on their task when certain condition met.
example: If a
then email user on action a
else
email user on action b.
I'm pretty new in scripting, appreciate any suggestions.
Thanks. (4 Replies)
I am having trouble figuring this code
I want to grep a text from a file and if it match certain text it break out of the loop or it should continue searching for the text
Here is what I have written but it isn't working
while true
f=`grep 'END OF STATUS REPORT' filename`
do
if ... (9 Replies)
Hello all, I created the below script....and it seemed to be working fine. My problem is i want the script to ignore rest of the things if my condition is not met but do not exit....
#!/bin/ksh
###########################
###########################
# Set name of the listener, this... (2 Replies)
All,
I wrote the following section of code (which logically in PHP would of worked):
tmpPATH=${1}
tmpTAG=${2}
if
then
while read tmpTAG tmpPATH
do
fi
echo $tmpTAG
echo $tmpPATH
if
then
done < ./config.cfg
fi (4 Replies)
only wc -l greater than 0 then send email to owner, otherwise do nothing.
ie.
result=powermt display dev=all|awk '{print $7}'|grep -i dead|wc -l
if
then
echo $result
else
:
fi
mailx -s "there is dead path (s)" "mymail@mydomain.com"
-----------
it is not working... (2 Replies)
i have a table like this:
id, senderNumber, blacklist
-----------------------------
1 0835636326 Y
2 0373562343 Y
3 0273646833 Y
and I want to delete automatically if a new inserted row on another table consist anything on senderNumber column above using a BASH Script
I... (9 Replies)
Hi All,
Seeking for your assistance to print all the specific field when the condition met.
Ex:
file1.txt
1|203|3|31243|5341|6452|623|22|00|01
3|45345|123214|6534|3423|6565|643|343|232|10
if field 1 = 1 and field 3 = 3 and field 5 = 5341 and field 6 = 6452
it will print from $1 to $10.... (2 Replies)
Hi All,
Seeking for your assistance on how to append the specific string when $3 condion met.
ex. file1.txt
ar0050046b16,5,888,0,0,0,0.00,0.00,0.00,0.00,25689.55
ar0050046b16,5,0,0,0,0,0.00,0.00,0.00,0.00,25689.55
ar0050046b16,5,0,0,0,0,0.00,0.00,0.00,0.00,25689.55
expected output:... (5 Replies)
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)
I have a file.txt containing the following:
Query= HWI-ST863:386:C5Y8UACXX:3:2302:16454:89688 1:N:0:ACACGAAT
Length=100
Score E
Sequences producing significant alignments: (Bits) Value
... (2 Replies)
Discussion started by: tons92
2 Replies
LEARN ABOUT MINIX
setpflags
getpflags(2)getpflags(2)NAME
getpflags, setpflags - get or set process flags
SYNOPSIS
#include <sys/types.h>
#include <priv.h>
uint_t getpflags(uint_t flag);
int setpflags(uint_t flag, uint_t value);
The getpflags() and setpflags() functions obtain and modify the current per-process flags.
The following values for flag are supported:
PRIV_AWARE This one bit flag takes the value of 0 (unset) or 1 (set). Only if this flag is set is the current process privilege-
aware. A process can attempt to unset this flag but might fail silently if the observed set invariance condition cannot be
met. Setting this flag is always successful. See privileges(5) for a discussion of this flag.
PRIV_DEBUG This one bit flag takes the value of 0 (unset) or 1 (set). Only if this flag is set does the current process have privi-
lege debugging enabled. Processes can set and unset this flag at will.
The getpflags() returns the value associated with a given per-process flag. If the flag argument is invalid, (uint_t)-1 is returned and
errno is set to indicate the error.
Upon successful completion, setpflags() returns 0. Otherwise, -1 is returned and errno is set to indicate the error.
The getpflags() and setpflags() functions will fail if:
EINVAL The value of flag or the value to which the flag is set is out of range.
The setpflags() function will fail if:
EPERM An attempt was made to unset PRIV_AWARE but the observed set invariance condition was not met.
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
|MT-Level |Async-Signal-Safe |
+-----------------------------+-----------------------------+
ppriv(1), attributes(5), privileges(5)
7 Mar 2005 getpflags(2)