Sponsored Content
Top Forums UNIX for Dummies Questions & Answers I have the logic down but syntax .... =( Post 302240842 by Unice on Friday 26th of September 2008 06:53:05 PM
Old 09-26-2008
I have the logic down but syntax .... =(

Hey guys newb here... Here is what I'm trying to do

File1
AAA
BBB
CCC

File2
xxx xxx xxx xxx xxx AAA
xxx xxx xxx xxx xxx BBB
xxx xxx xxx xxx xxx CCC

if $1 of File 1 matches $6 of File 2 then print matching $0 of File 2 .....

I've tried catting File2 into an array and ran a matching pattern to $6 on File2 but I am having serious syntax issues.... Is this a proper start?

cat File2 | awk ' {x[$0]=$6} END {if($1 = x[$0]=$6) print $0} ' File1

Im trying super hard to grasp awk but I dont think I'm built for it Smilie...... Thanks for any suggestions....Smilie
 

We Also Found This Discussion For You

1. UNIX for Dummies Questions & Answers

Help | Unix | grep | regular expression | backreference | Syntax/Logic

Hello, I'm working on learning regular expressions and what I can do with them. I'm using unix to and its programs to experiment and learn what my limitations are with them. I'm working on duplicating the regular expression: ^(.*)(\r?\n\1)+$ This is supposed to delete duplicate lines... (2 Replies)
Discussion started by: MykC
2 Replies
face(1)                                                            User Commands                                                           face(1)

NAME
face - executable for the Framed Access Command Environment Interface SYNOPSIS
face [-i init_file] [-c command_file] [-a alias_file] [filename...] DESCRIPTION
The Framed Access Command Environment Interface (FACE) presents your files and file folders on the screen through a system of menus and forms if you are properly set up as a FACE user. filename must follow the naming convention Menu.xxx for a menu, Form.xxx for a form, and Text.xxx for a text file, where xxx is any string that conforms to the UNIX system file naming conventions. The Form and Menu Language Interpreter (FMLI) descriptor lifetime will be ignored for all frames opened by argument to face. These frames have a lifetime of immortal by default. If filename is not specified on the command line, the FACE Menu will be opened along with those objects specified by the LOGINWIN environment variables. These variables are found in the user's .environ file. OPTIONS
The following options are supported: -a alias_file Alias file -c command_file Command file -i init_file Initial file OPERANDS
The following operand is supported: filename The full pathname of the file describing the object to be opened initially. EXIT STATUS
The face command will return a non-zero exit value if the user is not properly set up as a FACE user. FILES
$HOME/pref/.environ ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWfac | +-----------------------------+-----------------------------+ SEE ALSO
env(1), attributes(5) SunOS 5.10 5 Jul 1990 face(1)
All times are GMT -4. The time now is 01:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy