AWK syntax /bailing script error when executing in UNIX
Hi I am trying to execute the following awk script in unix but getting
the following error
awk: syntax error near line 1
awk: bailing out near line 1
Please let me know what could be the reason.
And this is to pass some tokens and search in a directory to find particular tokens.
Last edited by Franklin52; 03-04-2011 at 03:00 AM..
Reason: Please use code tags
Hi
I'm using cygwin and the script below works just fine under cygwin..
when i upload it on a unix server the script fails with the following errors
-awk: syntax error near line 1
-awk: bailing out near line 1
any ideas why?
thanx
awk '($2 ~ /*/) {
if ($4 < 40){
print... (3 Replies)
hi there
i write one awk script file in shell programing
the code is related to dd/mm/yy to month, day year format
but i get an error
please can anybody help me out in this problem ??????
i give my code here including error
awk `
# date-month -- convert mm/dd/yy to month day,... (2 Replies)
Hello All,
I looking for a way to verify the correction of shell script syntax.
Is there any switch like -c in perl which do this in shell ?
Thank You. (1 Reply)
Hi All,
Can some body help me in this to work
#!/bin/ksh
nof=`wc -l outFile_R.out | sed -e 's/*//g' `
no_of_lines=`expr $nof - 0`
z=1
while ]
do
cat outFile_R.out | awk -v I="$z" 'NR==I { print $0 }' | read from_date to_date id
echo "executing $from_date... (2 Replies)
If you see this:
awk: syntax error near line 1
awk: bailing out near line 1
Chances are you are working on Solaris and you are using standard awk.
If so, you need to use /usr/xpg4/bin/awk instead, which is POSIX awk (or nawk if that is not available). (1 Reply)
I am trying to run a unix script in my home directory.Snippet below
echo "`date '+%Y%m%d_%H%M%S'` Getting ProductList.dat"
if ( -f $DIR/ProductList.dat) then
cp $DIR/ProductList.dat MigratedProductList.dat
else
echo "`date '+%Y%m%d_%H%M%S'`ProductList.dat does not exist; Processing... (4 Replies)
I've found this script which seems very promising to solve my issue:
To search and replace many different database passwords in many different (.php, .pl, .cgi, etc.) files across my filesystem.
The passwords may or may not be contained within quotes, single quotes, etc.
#!/bin/bash... (4 Replies)
Hello Everyone,
Coming again for your help to solve the below error:
In a script, i had created a temp table (Temp_table) and loaded the data in it using bcp command (performed successfully) and I wanted to move it to the preferred table (called Main_table) for further use. hence I have added... (1 Reply)
Hello Everyone,
Coming again for your help to solve the below error:
In a script, i had created a temp table (Temp_table) and loaded the data in it using bcp command (performed successfully) and I wanted to move it to the preferred table (called Main_table) for further use. hence I have added... (7 Replies)
Discussion started by: Suresh
7 Replies
LEARN ABOUT DEBIAN
igawk
IGAWK(1) Utility Commands IGAWK(1)NAME
igawk - gawk with include files
SYNOPSIS
igawk [ all gawk options ] -f program-file [ -- ] file ...
igawk [ all gawk options ] [ -- ] program-text file ...
DESCRIPTION
Igawk is a simple shell script that adds the ability to have ``include files'' to gawk(1).
AWK programs for igawk are the same as for gawk, except that, in addition, you may have lines like
@include getopt.awk
in your program to include the file getopt.awk from either the current directory or one of the other directories in the search path.
OPTIONS
See gawk(1) for a full description of the AWK language and the options that gawk supports.
EXAMPLES
cat << EOF > test.awk
@include getopt.awk
BEGIN {
while (getopt(ARGC, ARGV, "am:q") != -1)
...
}
EOF
igawk -f test.awk
SEE ALSO gawk(1)
Effective AWK Programming, Edition 1.0, published by the Free Software Foundation, 1995.
AUTHOR
Arnold Robbins (arnold@skeeve.com).
Free Software Foundation Nov 3 1999 IGAWK(1)