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
DEBUGREISERFS(8)					      System Manager's Manual						  DEBUGREISERFS(8)

NAME
debugreiserfs SYNOPSIS
debugreiserfs [ -dDJmoqpS ] [ -j device ] [ -B blocknumber ] device DESCRIPTION
It helps sometimes to solve problems with reiserfs filesystems. Being called w/o options it prints super block of reiserfs filesystem found on the device. device is the special file corresponding to the device (e.g /dev/hdXX for IDE disk partition or /dev/sdXX for SCSI disk partition). OPTIONS
-j device print contents of journal. Also with the option -p it allows to pack journal into archive with other metadata -J print journal header. -d print formatted nodes of the internal tree of the filesystem -D print formatted nodes of all used blocks of the filesystem -m print contents of bitmap (not very useful) -o print objectid map (not very useful) -1 blocknumber print specified block of the filesystem -p Makes debugreiserfs to find filesystem metadata This option exists to help reiserfsck debugging. If reiserfsck fails - you may extract filesystem metadata with debugreiserfs -p /dev/xxx |gzip -c > xxx.gz. We download that data and make the filesystem similar to your with gunzip -c xxx.gz | unpack /dev/xxx (unpack is included into reiserfsprogs package). This usually allows to reproduce and debug the problem quickly. When data file is not too large. -S When -S is not specified -p deals with blocks marked used in the filesystem bitmap. With this option set they will work with whole device. -q Suppress showing speed of progress when -p is in use AUTHOR
This version of debugreiserfs has been written by Hans Reiser <reiser@idiom.com>. BUGS
There are probably few of them. Please, report bugs to ReiserFS mail-list <reiserfs-list@namesys.com>. SEE ALSO
reiserfsck(8), mkreiserfs(8) Reiserfsprogs 3.6.4 January 2002 DEBUGREISERFS(8)
All times are GMT -4. The time now is 08:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy