Search Results

Search: Posts Made By: jbrass
29,525
Posted By Corona688
I suggest using ssh keys. This will make it...
I suggest using ssh keys. This will make it fully automatic and not require having the expect brute-forcing tool publicly installed on your system.
3,143
Posted By Chubler_XL
how about using awk like this: TICLI...
how about using awk like this:

TICLI "op:alarm,all" | awk '
FNR==NR {V[$3+0]=$0; next}
/GEN/ && /RUN/ && ($3 in V) {
if(!found) {
print "Austin Generators Running Alarms:"
...
7,015
Posted By MadeInGermany
sed does not have variables; in order to avoid...
sed does not have variables; in order to avoid the match in the further lines one must read them in a loop.
In traditional multi-line syntax (not possible in csh/tcsh):
sed '
/\<San Antonio...
7,015
Posted By MadeInGermany
Traditional sed needs a multi-line string: sed...
Traditional sed needs a multi-line string:
sed '/\<San Antonio Generators Running\>/ i\
hello world' outagereport.txt
Or
sed '
/\<San Antonio Generators Running\>/ i\
hello world
'...
7,015
Posted By rbatte1
What output do you get? I'm not a sed expert...
What output do you get?

I'm not a sed expert at all, but it would seem that you need to substitute your string with new-line and then your string. I think you are adding literally nothing with...
7,015
Posted By RudiC
Well, you are not searching the pattern that you...
Well, you are not searching the pattern that you cite in your text; there's an extra " and an extra s in the pattern. And, try \n for the replacement string.
3,215
Posted By RudiC
Try TICLI "op:alarm,all" | { grep BATT && echo...
Try TICLI "op:alarm,all" | { grep BATT && echo "success" || printf "Zero Battery Alarms\n"; }
3,215
Posted By RudiC
How aboutTICLI "op:alarm,all" | { grep BATT ||...
How aboutTICLI "op:alarm,all" | { grep BATT || printf "Zero Battery Alarms\n"; } >> outagereport
Showing results 1 to 8 of 8

 
All times are GMT -4. The time now is 01:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy