Sponsored Content
Full Discussion: Awk if elseif syntax error
Top Forums Shell Programming and Scripting Awk if elseif syntax error Post 302317286 by vgersh99 on Monday 18th of May 2009 01:38:54 PM
Old 05-18-2009
loose ';' and '\'.
Why do you need them?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

awk syntax error

can anyone see the awk syntax error near line 1? I keep getting this error and I'm not familiar with awk very well yet so it is hard for me to see the errors. fyi: deleteuser* refers to files in the directory where each one ends with a different date ls -1 /mfupload/prod02/ftp/deleteuser* |... (12 Replies)
Discussion started by: k@ssidy
12 Replies

2. Shell Programming and Scripting

awk syntax error

mVar=0 count=`awk -F, '( ( $2 ~ /^GIVEUP$/ && $3 ~ /^NEW$/ ) || ( $2 ~ /^SPLIT$/ && $3 ~ /^NEW$/ ) || ( $2 ~ /^OPTION$/ && $3 ~ /^NEW$/ ) || ( $2 ~ /^OPTIONSPLIT$/ && $3 ~ /^NEW$/ ) ) { count++ } END { print count }' myCSV.csv myVar=`expr $myVar + $count` Can I do this? I get a syntax... (4 Replies)
Discussion started by: yongho
4 Replies

3. Shell Programming and Scripting

syntax error with awk.

A shell script a.sh calls an awk script using : awk -v OUTPUTDIR=${OUTPUTDIR}${OUTPUTDIRDATE} -f ${SCRIPTSPATH}chngNullBillId.awk ${INPUTFILE} chngNullBillId.awk : { if (substr($0,9,4)=="0000") printf( "%s0001%s", substr($0,1,8), substr($0,13,67) )>>${OUTPUTDIR}"goodfile.txt"; else print... (2 Replies)
Discussion started by: Amruta Pitkar
2 Replies

4. UNIX for Dummies Questions & Answers

'awk' syntax error

Due to some syntax error, my below code is not working. #!/usr/bin/ksh nawk ' BEGIN { cur_val=0; cur_zero=0; cur_nine=0; sum_zero=0; sum_nine=0; } /^/ { cur_val=substr($0,5,2); if("cur_val" == "0") { ... (3 Replies)
Discussion started by: lokiman
3 Replies

5. UNIX for Dummies Questions & Answers

awk syntax error

I generate a fullpath variable two different ways: 1) concat two variables rootpath and relpath to give me fullpath 2) use 'find' to get the fullpath when I echo the variable, I get the same output for both. However, I print the variable from method 1 in the below loop I get "awk syntax... (0 Replies)
Discussion started by: orahi001
0 Replies

6. UNIX for Dummies Questions & Answers

awk Shell Script error : "Syntax Error : `Split' unexpected

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)
Discussion started by: Herry
2 Replies

7. Shell Programming and Scripting

awk syntax error

Hi, I can't see what is wrong with the following command. I am extracting a dollar amount (AMT_REJ, 6th field) from a comma delimited record and need to output it as numeric, removing the $sign and decimal point and output to another file. Everything seems to work except the $ sign which I need... (1 Reply)
Discussion started by: ski
1 Replies

8. Shell Programming and Scripting

Syntax error using Awk

more report2.txt how to modify the AWK to print above out put for given n no of inputs using report2.txt file? out put should be (3 Replies)
Discussion started by: kanakaraju
3 Replies

9. UNIX for Dummies Questions & Answers

If Then ElseIf Script - Confusion Around Expression's Syntax

Hello, I am relatively new to UNIX scripting and am learning a lot. I have already tried several searches on this website and have tried various syntax options suggested to no avail. I am obviously not writing the script correctly. I really do appreciate any and all the help. Below is an... (8 Replies)
Discussion started by: dqrgk0
8 Replies

10. Shell Programming and Scripting

awk syntax error

Hi All, I wrote a simple script.sh program for i in seq (22) do awk '$1==${i}' file1.txt|awk '{print $2}'> file${i}_study.txt done and then run it %bash %chmod +x script.sh % ./script.sh Give me error awk: $1==${i} awk: ^ syntax error Do you have any idea why... (3 Replies)
Discussion started by: senayasma
3 Replies
XrmStringToBindingQuarkList()											     XrmStringToBindingQuarkList()

Name
  XrmStringToBindingQuarkList - convert a key string to a binding list and a quark list.

Synopsis
  XrmStringToBindingQuarkList(string, bindings_return, quarks_return)
	  char *string;
	  XrmBindingList bindings_return;
	  XrmQuarkList quarks_return;

Arguments
  string    Specifies the string for which the list of quarks and list of bindings_return are to be generated.	Must be NULL-terminated.

  bindings_return
	    Returns the binding list.  The caller must allocate sufficient space for the binding list before the call.

  quarks_return
	    Returns the list of quarks.  The caller must allocate sufficient space for the quarks list before the call.

Description
  XrmStringToBindingQuarkList() converts a resource specification string into two lists - one of quarks and one of bindings.  Component names
  in the list are separated by a dot (.) indicating a tight binding or an asterisk (*) indicating a loose binding.  If the  string  does  not
  start with dot or asterisk, a dot (".") is assumed.

  A  tight  binding means that the quarks on either side of the binding are consecutive in the key.  A loose binding, on the other hand, is a
  wildcard that can match any number of unspecified components in between the two quarks separated by the binding.  Tight and loose  bindings
  are used in the match rules, which compare multicomponent strings to find matches and determine the best match.  See XrmGetResource() for a
  full description of lookup rules.

  For example, *a.b*c becomes:

quarks	 bindings
a	 XrmBindLoosely
b	 XrmBindTightly
c	 XrmBindLoosely

For more information, see Volume One, Chapter 13, Managing User Preferences.

Structures
     typedef int XrmQuark, *XrmQuarkList;
     typedef enum (
	 XrmBindLoosely, XrmBindTightly
     ) XrmBinding, *XrmBindingList;

See Also
  XrmDestroyDatabase(), XrmGetFileDatabase(), XrmGetResource(), XrmGetStringDatabase(),  XrmInitialize(),  XrmMergeDatabases(),  XrmParseCom-
  mand(),  XrmPutFileDatabase(),  XrmPutLineResource(),  XrmPutResource(),  XrmPutStringResource(),  XrmQGetResource(),  XrmQGetSearchList(),
  XrmQGetSearchResource(), XrmQPutResource(), XrmQPutStringResource(), XrmQuarkToString(), XrmStringToQuarkList(), XrmStringToQuark(),	XrmU-
  niqueQuark().

Xlib - Resource Manager 											     XrmStringToBindingQuarkList()
All times are GMT -4. The time now is 06:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy