Sponsored Content
Full Discussion: blanks in an awk comand
Top Forums Shell Programming and Scripting blanks in an awk comand Post 54821 by collie on Wednesday 25th of August 2004 11:35:10 AM
Old 08-25-2004
blanks in an awk comand

Hi,

Im trying to write something that will report if a filesytem is over 80% but the problem is the output reports on a dir that is a 9%.

any ideas?

this is what I have

*************************************************
if [ -z "$1" ]
then
param=90
else
param=$1
fi
df -kl | grep -iv filesystem | awk ' { if ( $5 > "80%" || $5 >= p"%" ) { print }
}' p=$param -
exit 0
**************************************************
My output is as follows.

/dev/stand 56227 5017 51210 9% /stand
/dev/dsk/c0b0t0d2s1 17709056 14750200 2958856 84% /bi
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

mount comand

Dear experts: I am installing software on Unix via telnet using CD on my NT workstation. What kind of NFS & mount comands I should run in the beginning ? (what exactly should be <drive for cdrom> and <mount ditectory> in the mount comand? Thanks in advance, etc.. (6 Replies)
Discussion started by: lostam
6 Replies

2. UNIX for Dummies Questions & Answers

exec comand

hi, i have written a small script in which i use exec command and redriect output to a file..after sometime i want to switch it off and redirect the output to screen..how to do it exec >> /tmp/out.txt 2>&1 //set of statements then i want to switch of these exec as the rest should get... (5 Replies)
Discussion started by: mkan
5 Replies

3. Shell Programming and Scripting

Testing a comand in the script

Hi everyone , i am new to shell scripting and am having some problem to test if this line has been executed well and display a pass message on the screen or fail if not sqlplus XXTEST/$2 <<END > $XXTEST_TOP/log/$0.log @$XXTEST_TOP/admin/sql/XXTEST_SPE1_XX_QUOTE_DETAILS_TBL.sql XXTEST$2... (2 Replies)
Discussion started by: Lutchumaya
2 Replies

4. Solaris

comand df -k

I need to know the available space in my unix. when making a df -k it shows me the following thing: /dev/vx/dsk/emc2/vol06 136764867 121542767 1545614 99% /emc06 would need them to explain to me well the command. since under the column avail the resulting value is... (2 Replies)
Discussion started by: roviedo
2 Replies

5. Shell Programming and Scripting

awk{FIELDWIDTHS} replacing blanks with null

Hi, I am having a file and grabbed the contents of the field according to field widths. The command i used is: awk 'BEGIN{FIELDWIDTHS="10 25 20 14 6 10"}{print$4,$5,$6}' newtext.text >test1.txt i got the output for example: val1 val2 val3 <blank> ... (3 Replies)
Discussion started by: rish_max
3 Replies

6. Solaris

Using dd comand

Hello peolple i have to check a tape with de dd comand and redirect the exit dd if=/dev/rmt/0cn ibs=1024k of=/dev/null i need that the exit from that commando go to a log if a do this dd if=/dev/rmt/0cn ibs=1024k of=/dev/null > x.log don`t send me nothing to the log only in the screen. I need... (1 Reply)
Discussion started by: enkei17
1 Replies

7. Shell Programming and Scripting

Passing variable as an input file to AWK comand

Hi, I would like to compare 2 files using awk, which I can do by using: awk 'NR==FNR{a;next} (NR > 32 && $2 in a) {print $0}' File1 and File2. If the name of the File1 is in another file (for example, column 4 in File 3) then how can I pass this column 4 to the awk command. Thanks in... (1 Reply)
Discussion started by: ezhil01
1 Replies

8. Shell Programming and Scripting

UNIX comand

Team, I need unix command to grep directory part from the string for example I have a texts something like /apps/opt/data/current/spool/test.dbf /apps/opt/archive/../../test.dbf I need only directory part from that string like my out put will /apps/opt/data/current/spool/... (1 Reply)
Discussion started by: asappidi
1 Replies

9. Shell Programming and Scripting

Problem with blanks, shifting the row when using awk

Hello, I have files with fixed length fields. 12345 12345 12345671234567 10 1234567 12345 12345 123456 1234567 10 1234567 I want to take 1st, 3rd, 4th and 6th string. Usually 3rd and 4th string are coming as it is on the first row /1234567 and... (3 Replies)
Discussion started by: apenkov
3 Replies

10. Shell Programming and Scripting

awk to remove row 1 and blanks

I am trying to remove $1 along with the blank values from the file. Thank you :). file R_Index Chr Start End Ref Alt Func.IDP.refGene Gene.IDP.refGene GeneDetail.IDP.refGene Inheritence ExonicFunc.IDP.refGene AAChange.IDP.refGene avsnp147 PopFreqMax ... (5 Replies)
Discussion started by: cmccabe
5 Replies
MYSQLBUG(1)						       MySQL Database System						       MYSQLBUG(1)

NAME
mysqlbug - generate bug report SYNOPSIS
mysqlbug DESCRIPTION
This program enables you to generate a bug report and send it to Oracle Corporation. It is a shell script and runs on Unix. The normal way to report bugs is to visit http://bugs.mysql.com/, which is the address for our bugs database. This database is public and can be browsed and searched by anyone. If you log in to the system, you can enter new reports. If you have no Web access, you can generate a bug report by using the mysqlbug script. mysqlbug helps you generate a report by determining much of the following information automatically, but if something important is missing, please include it with your message. mysqlbug can be found in the scripts directory (source distribution) and in the bin directory under your MySQL installation directory (binary distribution). Invoke mysqlbug without arguments: shell> mysqlbug The script will place you in an editor with a copy of the report to be sent. Edit the lines near the beginning that indicate the nature of the problem. Then write the file to save your changes, quit the editor, and mysqlbug will send the report by email. COPYRIGHT
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc. This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. SEE ALSO
For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available online at http://dev.mysql.com/doc/. AUTHOR
Sun Microsystems, Inc. (http://www.mysql.com/). MySQL 5.1 04/06/2010 MYSQLBUG(1)
All times are GMT -4. The time now is 11:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy