Sponsored Content
Full Discussion: Awk Problem - Fixing needed
Top Forums Shell Programming and Scripting Awk Problem - Fixing needed Post 302681691 by SkySmart on Friday 3rd of August 2012 09:32:21 PM
Old 08-03-2012
Awk Problem - Fixing needed

os: sunos/linux
shell: bash

Code:
                        awk -v PCT="$PERCENTAGE" -v UWARN="$UWARNING" -v UCRIT="$UCRITICAL" 'BEGIN {
                                PCT=PCT+0; UWARN=UWARN+0; UCRIT=UCRIT+0 ;
                                if(PCT<UWARN) { printf \" '${FILESYS}': size('${SIZE}'),usage('${USAGE}'),pct('$PERCENTAGE')\" } }'

i'm getting errors like:

Code:
awk: cmd. line:2:                         	if(PCT<UWARN) { printf \" Virtual
awk: cmd. line:2:                         	                       ^ backslash not last character on line
awk: cmd. line:2:                         	if(PCT<UWARN) { printf \" Memory
awk: cmd. line:2:                         	                       ^ backslash not last character on line

yes i already tried without the back slash and without the "printf". i tried "print". but still not working.
 

10 More Discussions You Might Find Interesting

1. Solaris

Problem fixing e1000gx ni to 100fdx / Solaris 10 / T5220

Hello ! i'm facing an anoying problem during configuration of our new T5220 Enperise server. I've upgarded 'em with a pci-e ethernet expantion card for four additional networkinterfaces using the nxge drivers. i could fix them to 100 fdx rather simple by adding the following settings to the ... (6 Replies)
Discussion started by: moofoo
6 Replies

2. Shell Programming and Scripting

eval problem.. advice needed!

Hi I need some major help with eval I have a statement using eval: read input eval variable$input=”something” Now I want to use the “variable$input” in some commands but I don't know how to call it without replacing the $input with the command line value (which I obviously can't do). ... (1 Reply)
Discussion started by: Cactus Jack
1 Replies

3. Linux

fixing with sed

I am trying to replace the value of $f3 but its not working . I don't know what I am missing here . cat dim_copy.20080516.sql | grep -i "create view" | grep -v OPSDM002 | while read f1 f2 f3 f4 f5 f6 f7 f8 f9 do echo " $f3 " sed -e... (13 Replies)
Discussion started by: capri_drm
13 Replies

4. IP Networking

Specific routing problem help needed

Hi, I am trying to set up the following : - One linux box connected to the net, static address, eth0 - No other eth interface on the box I want to set up this box in a way it can accept remote connections, like pptp tunnels (which seems the easier to set up unless you have other idea)... (2 Replies)
Discussion started by: aerostar700
2 Replies

5. Red Hat

Help needed in fixing port issue - Urgent

Hi, One of our web application is running in Linux and using apache web servers. Application is hosted in port 4080 (for soap requests) and port 9999, and its serving behind a vip and cname. Initially it was working fine in another server and recently (2 months back) we have moved to the new... (4 Replies)
Discussion started by: senor.ram
4 Replies

6. Shell Programming and Scripting

Help fixing awk code to print values from 2 files

Hi everyone, Please help on this: I have file1: <file title="Title 1 and 2"> <report> <title>Title 1</title> <number>No. 1234</number> <address>Address 1</address> <date>October 07, 2009</date> <description>Some text</description> </report> ... (6 Replies)
Discussion started by: Ophiuchus
6 Replies

7. Shell Programming and Scripting

help fixing awk statement

awk "BEGIN {if($MessageREAD<$ThresholdW) {print \"OK\" ; exit 0} else if(($MessageREAD>=$ThresholdW) && ($MessageREAD<$ThresholdC)) {print \"WARNING\" ; exit 1}" else if($MessageREAD<=$ThresholdC) {print \"CRITICAL\" ;... (4 Replies)
Discussion started by: SkySmart
4 Replies

8. Solaris

help needed for fixing zfs bug

Hi Experts I've problem in a my office server (solaris 10 - x86) version. x4600 M2 hardware This system is getting rebooted because of zfs bug I've applied patch using live upgrade with live new environment created and applied the patch which oracle suggested( 144501-19), it asks for... (3 Replies)
Discussion started by: SunSolars_admin
3 Replies

9. AIX

Fixing security problem

Hi I use Rapid 7 to check some servers ( AIX 5.3 ) for security problems. There are 2 problems I don't know to deal with 1. Problem : TCP Sequence Number Approximation Vulnerability Solution : _Enable TCP MD5 Signature 2. Problem : HTTP Basic Authentication Enable Solution : _ Use... (5 Replies)
Discussion started by: bobochacha29
5 Replies

10. Shell Programming and Scripting

Help fixing awk code

can someone please help me spot and fix the issue with the following code: awk -F, -v SEARCHPATT="(Wed|Tue)" -v ADDISTR="Mon|Tue|Wed|Thu|Fri|Sat|Sun" -vVF="$VALFOUND" "BEGIN{ {D = D = 1 D = D = 2 } $0 ~ "," VF "," {L = 1 ... (9 Replies)
Discussion started by: SkySmart
9 Replies
REMOTE-VIEWER(1)					User Contributed Perl Documentation					  REMOTE-VIEWER(1)

NAME
remote-viewer - a simple remote desktop client SYNOPSIS
remote-viewer [OPTIONS] URI DESCRIPTION
remote-viewer is a simple remote display client. The supported protocols are SPICE and VNC. OPTIONS
The following options are accepted when running "remote-viewer": -h, --help Display command line help summary -V, --version Display program version number -v, --verbose Display information about the connection -z PCT, --zoom=PCT Zoom level of the display window in percentage. Range 10-200. -f, --full-screen Start with the window maximised to fullscreen --spice-controller Use the SPICE controller to initialize the connection with the SPICE server. This option is used by the SPICE browser addons to allow web page to start a client. --debug Print debugging information EXAMPLES
To connect to SPICE server on host "makai" with port 5900 remote-viewer spice://makai:5900 To connect to VNC server on host "tsingy" with port 5900 remote-viewer vnc://tsingy:5900 BUGS
Report bugs to the mailing list "http://www.redhat.com/mailman/listinfo/virt-tools-list" COPYRIGHT
Copyright (C) 2012 Red Hat, Inc., and various contributors. This is free software. You may redistribute copies of it under the terms of the GNU General Public License "http://www.gnu.org/licenses/gpl.html". There is NO WARRANTY, to the extent permitted by law. SEE ALSO
"virt-viewer(1)", the project website "http://virt-manager.org" perl v5.14.2 2012-05-28 REMOTE-VIEWER(1)
All times are GMT -4. The time now is 02:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy