Sponsored Content
Full Discussion: Suppress awk warnings
Top Forums Shell Programming and Scripting Suppress awk warnings Post 302219557 by joeyg on Tuesday 29th of July 2008 12:53:57 PM
Old 07-29-2008
Hammer & Screwdriver Without seeing your command text, here is a possible solution:

You can redirect output for standard output and error output. Two examples:

(a) Some commands may echo info back to your screen during/after execution. So, you could do the following

Code:
cd mydir 1>/dev/null

Because during a script execution, the extra stuff is distracting.

(b) One that I use all of the time is with cleaning up files. I don't care if the work file doesn't exist in the example

Code:
rm mytempfile 2>/dev/null

Another example would be in getting a count of files

Code:
filecnt=$(ls -l myftempfile 2>/dev/null | wc -l)

Here I don't care about the error, as filecnt will be set to 0 zero anyway.

So, perhaps you can incorporate some part of this into your awk command.
 

7 More Discussions You Might Find Interesting

1. AIX

Sysback Warnings

I am currently running backups using an entry in the crontab redirection the output to a file. From time to time I get a backup complete with Warnings but don't know what the warnings are and they don't appear in the file. Where can I view the warings? Is there a command to view the warnings? ... (2 Replies)
Discussion started by: daveisme
2 Replies

2. Shell Programming and Scripting

need to extract warnings and cautions

I need to extract all "text" from within <WARNING>text</WARNING> and "text" from within <CAUTION>text</CAUTION> tags in an SGML file. I need this separated or formatted in a file so that I can copy and paste the warnings and cautions into a table. Looking for ideas. Thanks. (4 Replies)
Discussion started by: ScotRite
4 Replies

3. UNIX for Dummies Questions & Answers

How to suppress minor C compiler warnings

Hi, I develop code using a few different solaris platforms. I've recently moved to SunOS 5.10 using the following c compiler. Sun C++ 5.9 SunOS_sparc Patch 124863-01 2007/07/25 On this box and these versions I get hundreds of warnings that do not appear of the earlier solaris/c versions. ... (4 Replies)
Discussion started by: speedos82
4 Replies

4. Solaris

Not getting warnings!!

I have tried to compile the code on solaris which is bash-3.00$ uname -a SunOS zen 5.7 Generic_106541-37 sun4u sparc SUNW,Ultra-80 bash-3.00$ CC -V CC: WorkShop Compilers 5.0 98/12/15 C++ 5.0 when I compile just a simple program, int main() { long kk = 200; int jj = kk; return... (0 Replies)
Discussion started by: amit_27
0 Replies

5. AIX

Warnings in AIX

Dear experts, please help in this regard, when i am trying to compile some files for 64 bit in AIX, iam getting this warning "/usr/include/alloca.h", line 34.9: 1540-1401 (I) An unknown "pragma __alloca" is specified. how to solve this warning , what is the significance of this please... (1 Reply)
Discussion started by: vin_pll
1 Replies

6. Shell Programming and Scripting

How to handle errors and warnings

Hi Guys, I am working on a shell script(main script) where in i have to call another script B and pass parameter to that script. I see that the shell script that is being called in the main script is throwing warnings/fatal errors. So i am just wondering how do i capture these and ask the script... (1 Reply)
Discussion started by: stunnerz_84
1 Replies

7. Shell Programming and Scripting

executing script shows some warnings

Hi, Upon executing the below script ..... #!/bin/sh while read DAYS INDIR OUTDIR do find $INDIR -type f "!" -mtime $DAYS -exec mv {} $OUTDIR \; done </home/Administrator/scripts/tarconfig.sh I got the following error... and the files are transferred to out put folder from input... (9 Replies)
Discussion started by: rahul125
9 Replies
Locale::Script(3perl)					 Perl Programmers Reference Guide				     Locale::Script(3perl)

NAME
Locale::Script - standard codes for script identification SYNOPSIS
use Locale::Script; $script = code2script('phnx'); # 'Phoenician' $code = script2code('Phoenician'); # 'Phnx' $code = script2code('Phoenician', LOCALE_CODE_NUMERIC); # 115 @codes = all_script_codes(); @scripts = all_script_names(); DESCRIPTION
The "Locale::Script" module provides access to standards codes used for identifying scripts, such as those defined in ISO 15924. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default ISO 15924 four-letter codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying scripts. The ones currently supported are: alpha This is a set of four-letter (capitalized) codes from ISO 15924 such as 'Phnx' for Phoenician. This code set is identified with the symbol "LOCALE_SCRIPT_ALPHA". The Zxxx, Zyyy, and Zzzz codes are not used. This is the default code set. numeric This is a set of three-digit numeric codes from ISO 15924 such as 115 for Phoenician. This code set is identified with the symbol "LOCALE_SCRIPT_NUMERIC". ROUTINES
code2script ( CODE [,CODESET] ) script2code ( NAME [,CODESET] ) script_code2code ( CODE ,CODESET ,CODESET2 ) all_script_codes ( [CODESET] ) all_script_names ( [CODESET] ) Locale::Script::rename_script ( CODE ,NEW_NAME [,CODESET] ) Locale::Script::add_script ( CODE ,NAME [,CODESET] ) Locale::Script::delete_script ( CODE [,CODESET] ) Locale::Script::add_script_alias ( NAME ,NEW_NAME ) Locale::Script::delete_script_alias ( NAME ) Locale::Script::rename_script_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Script::add_script_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Script::delete_script_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes man page. SEE ALSO
Locale::Codes Locale::Constants http://www.unicode.org/iso15924/ Home page for ISO 15924. AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 1997-2001 Canon Research Centre Europe (CRE). Copyright (c) 2001-2010 Neil Bowers Copyright (c) 2010-2011 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2011-09-26 Locale::Script(3perl)
All times are GMT -4. The time now is 08:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy