Sponsored Content
Full Discussion: SFU awk help
Top Forums Shell Programming and Scripting SFU awk help Post 302150165 by Perderabo on Monday 10th of December 2007 11:07:16 AM
Old 12-10-2007
Well, this does seem odd...
Code:
$ awk   '$1>=dt' dt="2007-12-03" data
2007-12-01 too early
2007-12-03 exact match
2007-12-12 afterwards
$
$
$ awk   '$1>=dt {print $0}' dt="2007-12-03" data
2007-12-03 exact match
2007-12-12 afterwards
$
$
$ uname -a
Interix octave 3.5 SP-8.0.1969.1 x86 Intel_x86_Family15_Model2_Stepping7
$

Both of the above commands violate the man page which states that variable assignments must precede the awk program and have a -v. But doing it right has the same effects...
Code:
$ awk -v dt="2007-12-03" '$1 >= dt' data
2007-12-01 too early
2007-12-03 exact match
2007-12-12 afterwards
$ awk   -v dt="2007-12-03" '$1 >= dt { print $0 }' data
2007-12-03 exact match
2007-12-12 afterwards
$

It looks like a bug to me.
 

10 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Interix/MS Windows SFU

Hey guys, Any chance of getting a thread under 'Special Interest Topics' for Interix/SFU? This has to be one of the most poorly documented pieces of software floating around and it works great for interoperability of windows systems with the rest of your unix/linux network rather than having to... (3 Replies)
Discussion started by: chek
3 Replies

2. Windows & DOS: Issues & Discussions

Changing Directory Using SFU

Just installed SFU in my PC running under Windows XP Pro. Could someone tell us how to change directory and to its subdirectories either by Korn Shell or C Shell? I tried, cd f:\ or chdir f:\ but it didn't work. (1 Reply)
Discussion started by: ilak1008
1 Replies

3. Windows & DOS: Issues & Discussions

FTP using SFU

I'm trying to ftp a file from Solaris to Windows XP Pro using SFU and the command that I used is as follows: ftp -n “host” << cmd user “loginname” “password” cd Directory ls filename error bye cmd If the filename does not exist, it shows the following output: Output to local-file:... (2 Replies)
Discussion started by: ilak1008
2 Replies

4. Windows & DOS: Issues & Discussions

Wrong Ouput when using printf under SFU

I used printf to print the following under SFU, lrs=`cat lrs` hrs=`cat hrs` tp=`cat tp` printf “\n\n%5sM = $lrs Ohms%5sX = $hrs Ohms%5sT = $tp %%\n\n\n” > file cat file With the above script, I used %% after $tp only as a percentage sign and I get only the following output: % T =... (5 Replies)
Discussion started by: ilak1008
5 Replies

5. HP-UX

SFU/NFS question

I am new in UNIX so pardon me if I am asking this question. We are using SFU in Windows to have a Windows folder mounted over UNIX. While we can see the mount, everytime i cd on the mounted folder (e.g. cd CONFIG) I always get Permission denies error. Does anyone know why I cannot go inside the... (11 Replies)
Discussion started by: Jolas
11 Replies

6. UNIX for Advanced & Expert Users

How to use ps command on SFU emulator ?

Hi all How can I use ps command on korn shell emulated by SFU on Windows Server ? All others commands work fine, but this one I don't know :confused: Many thanks ---------- Post updated at 11:28 AM ---------- Previous update was at 10:12 AM ---------- Ok, it works fine in fact, I'm... (0 Replies)
Discussion started by: madmat
0 Replies

7. Shell Programming and Scripting

SQL*Plus under SFU

Hi all I have a problem again under Korn Shell with SFU. If I use sqlplus.exe like this : $ sqlplus.exe "/ as sysdba" SQL*Plus: Release 9.2.0.1.0 SQL> select value from v$parameter where name='user_dump_dest'; VALUE -------------------------------------------------------------... (9 Replies)
Discussion started by: madmat
9 Replies

8. HP-UX

SFU and NFS issues

Hi, I support a small lab of older HP UX 9 and 10 boxes. We have some older NT 4.0 machines at each UX box, with a old ZFS Server programs hosting two mounted directories. (Each UX and NT machine is on its own private network via crossover cable). Due to hardware failure/support EOL on NT, I have... (3 Replies)
Discussion started by: the spyder
3 Replies

9. Windows & DOS: Issues & Discussions

Empty folders with SFU

Hi all, i am currently setting my windows XP environment to use with Services for Unix (NFS Client) to mount my unix file system as a network drive. However, though i could mount the unix file directory successful, but the folder is empty (which is not). Why is this so? i have imported my unix... (6 Replies)
Discussion started by: lchunleo
6 Replies

10. UNIX for Beginners Questions & Answers

Tell me about PS command with SFU

Hi all, When I execute ps command with SFU (Microsoft Windows Services for UNIX), the result is returned as an empty line. Other commands will return correct results. How can I get the result of ps command correctly? Thank you. (2 Replies)
Discussion started by: tcx731
2 Replies
uuagc(1)							   User Commands							  uuagc(1)

NAME
uuagc - Attribute Grammar compiler SYNOPSIS
uuagc [ options ... ] file DESCRIPTION
This program uuagc is the compiler of the (Utrecht University) Attribute Grammar system. It takes as input AG source files (.ag) and pro- duces as output regular Haskell source files (.hs). Available options: -m generate default module header --module[=name] generate module header, specify module name -d, --data generate data type definition --strictdata generate strict data fields (when data is generated) --strictwrap generate strict wrap fields for WRAPPER generated data -c, --catas generate catamorphisms -f, --semfuns generate semantic functions -s, --signatures generate signatures for semantic functions --newtypes use newtypes instead of type synonyms -p, --pretty generate pretty printed list of attributes -w, --wrappers generate wappers for semantic domains -r, --rename rename data constructors --modcopy use modified copy rule --nest use nested tuples --syntaxmacro experimental: generate syntax macro code (using knit catas) -o file, --output=file specify output file -v, --verbose verbose error message format -h, -?, --help get usage information -a, --all do everything (-dcfsprm) -P search path, --=search path specify seach path --prefix=prefix set prefix for semantic functions --self generate self attribute --cycle check for cyclic definitions --version get version information -O,--optimize optimize generated code (--visit --case) --visit try generating visit functions --seq force evaluation using function seq (visit functions only) --unbox use unboxed tuples --case use nested cases instead of let (visit functions only) --Werrors turn warnings into fatal errors --dumpgrammar dump internal grammar representation (in generated code) COPYRIGHT
Copyright (C) 1998 -- 2005 Doaitse Swierstra, Arthur Baars and Alexey Rodriguez Copyright (C) 2005 -- 2007 Alexey Rodriguez Copyright (C) 2005 -- 2007 Joost Verhoog Copyright (C) 2006 -- 2007 Arie Middelkoop Copyright (C) 2006 -- 2007 Jeroen Fokker Copyright (C) 2007 Atze Dijkstra This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- CHANTABILITY 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 this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA AUTHOR
This manual page was written by Arjan Oosting <arjanoosting@home.nl> for the Debian system (but may be used by others). uuagc 0.9.4 April 2007 uuagc(1)
All times are GMT -4. The time now is 12:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy