10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to allow a user to enter in text and then store that text in a variable $gene to run in an awk command in which those values are used to run some calculations. I am getting syntax errors however, when I try. Thank you :).
The awk runs great if it is a pre-defined file that is used,... (7 Replies)
Discussion started by: cmccabe
7 Replies
2. Shell Programming and Scripting
looks like awk gets confused when there's a % next to a number.
command im running:
awk -F" " '/phxnaz001b/ && /vol/ && NF { if (($NF >= 80) && ($NF < 83)) { print ; print ; w++ } else if ($NF >= 83) { print ; c++ } } END { printf("%d:OK %d:WARNING %d:CRITICAL\n", o, w, c) }' /tmp/test.log
... (3 Replies)
Discussion started by: SkySmart
3 Replies
3. Shell Programming and Scripting
Hi
I am quite new to scripting and cannot work out how to do the following -
I want to pipe to a log file and then use the "last statement error" in an if statement after, and this doesn't work because it checks the pipe statement instead of the script.
Example:
executteTheScript $var |... (4 Replies)
Discussion started by: erjorgito
4 Replies
4. Shell Programming and Scripting
Hi All,
Please hav a look at the below peice of script and let me know if there are any syntax errors.
i found that the below peice of Script is causing issue. when i use SFTP its working fine, but there is a demand to use FTP only. please find below code and explain if anything is wrong... (1 Reply)
Discussion started by: mahi_mayu069
1 Replies
5. Shell Programming and Scripting
I have a long busybox ash script that has 3 stages.
1. Identify and Capture information on variable data sources, output the information to text file on each data source.
2. Using data from 1 above now actually do data processing on each individual dataset.
3. Produce report.
So... (6 Replies)
Discussion started by: tesser
6 Replies
6. Shell Programming and Scripting
can someone please explain to me what i'm doing wrong with this code:
WELT=$(awk '(($1 ~ "^${caag}$") || ($2 ~ "^${caag}$"))' /tmp/Compare.TEXT)
when run from the command line, it works. but it seems to be having a problem doing the comparison when variables are involved.
i tested from... (1 Reply)
Discussion started by: SkySmart
1 Replies
7. Shell Programming and Scripting
Consider a string with white space "abc 123"
string="abc 123"
echo $string
abc 123
sed "s/$string/$string 456/" file
abc 123 456
cat file
abc 123
OK for now, but if you put this one in a shell script
it gives the result:
abc 456 123
somehow string end in first white space ??
... (3 Replies)
Discussion started by: xramm
3 Replies
8. Linux
hi friends,
when i run this command on my machine;
df -k /export/home
output of this command i gets as:
/Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t1d0s7 5043168 4520584 472153 91% /export/home
i want to use column avail from above output: i... (1 Reply)
Discussion started by: johnray31
1 Replies
9. Solaris
Hi there
I have a box that at 4pm started recieving soft errors on a DIMM, normally this is ok and we have time to swap it out. But I got the following error which caused the box to reboot
NOTE: there were abount 6 or 7 normal "soft error encountered" messages before this one
Nov 7... (1 Reply)
Discussion started by: hcclnoodles
1 Replies
10. Solaris
Hi there, I have upgraded my explorer (SUNWexplo) on a solaris 10 Sparc box from version 3.4 to the latest version (5.5) . However im a little concerned, whenever I run the new explorer either manually or scheduled, I get a syslog event as follows
1 in 0:08:31: Sep 22 17:00:15 fmy.machine.com... (8 Replies)
Discussion started by: hcclnoodles
8 Replies