Sponsored Content
Full Discussion: using join command
Top Forums Shell Programming and Scripting using join command Post 302363217 by ehshi1992 on Monday 19th of October 2009 05:44:39 PM
Old 10-19-2009
using join command

I am given:
Sara:Smith:11234:3:63498:25:40
Perry:Potter:12445:2:35664:15:40
Ann:Abbott:23323:2:54865:22:42
Maple:Myers:24223:1:63498:18:35
Harold:Hanson:35664:2:54865:10:40
Bob:Brown:40778:1:24223:15:40
Jane:Jones:41288:1:53498:24:40
Wanda:Wallace:51122:4:63498:55:40
Mark:Miller:53498:1:24223:25:43
Tom:Tuckett:54865:2:63498:43:40
Zeb:Zucker:63498:1:10000:85:40
in one file

and :
1:North:2
2:South:1
3:East:4
4:West:3
in another

I am struggling to join the two so that rather having a line like Zeb:Zucker:63498:1:10000:85:40
i end up with a line in the file like
Zeb:Zucker:63498:North:85:40
but not for just one line, the whole file

or anything along those lines...
please help :(
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

join command

Hi, I'm using the join command and it appears to discard certain fields. Here are the two files i'm comparing: File1: 1 a 2 b 3 c 4 d 99 f 101 g 999 i 200 j File 2: 1 e 2 f 3 g 4 h 99 h (22 Replies)
Discussion started by: penfold
22 Replies

2. Shell Programming and Scripting

Join Command Help

Hi, I am trying to use join command for two files of size greater than 1 GB. join -t , -1 2 -2 1 -o 1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,1.10,1.11,1.12,1.13,1.14,1.15,1.16,1.17,1.18,1.19,1.20,1.21,1.22,1.23 File1 File2 > File3 we are facing space crunch after using these join command. May i... (0 Replies)
Discussion started by: jerome Sukumar
0 Replies

3. Shell Programming and Scripting

join (pls help on join command)

Hi, I am a new learner of join command. Some result really make me confused. Please kindly help me. input: file1: LEO oracle engineer 210375 P.Jones Office Runner ID897 L.Clip Personl Chief ID982 S.Round UNIX admin ID6 file2: Dept2C ID897 6 years Dept5Z ID982 1 year Dept3S ID6 2... (1 Reply)
Discussion started by: summer_cherry
1 Replies

4. Shell Programming and Scripting

Join command

Dear Experts, I have several (say 'm') text files, each with 'n' columns. I want to put them into a large single file with n*m columns. a 1 a 1 a 1 a 1 b 2 b 5 b 1 b 3 c 3 c 7 ... (1 Reply)
Discussion started by: Mish_99
1 Replies

5. Shell Programming and Scripting

join command

All, I have 3 files (tab seperated): Note: Please treat dash (-) as empty value in the file, I have added it to make input easily readable file1: (2 cols) A 1 B 2 C 3 file2: (4 cols - col4 has empty values for 4th column except 2nd row) A 1 5 - B 2 6 Y C 3 7 - D 4 8 - file3... (1 Reply)
Discussion started by: bgmmk
1 Replies

6. Shell Programming and Scripting

need help with join command

Hello, I am using join to merge two files together. The defaults usually works great join file1 file2 However, sometimes file1 or file2 has more keys, which I want to keep. file 1: -1 z 0 a 1 b 2 c file 2: 0 a2 1 b2 2 c2 3 c3 So I do join -a1 -a2 file1 file2 But then you don't... (0 Replies)
Discussion started by: ayu
0 Replies

7. Shell Programming and Scripting

awk command for simple join command but based on 2 columns

input1 a_a a/a 10 100 a1 a_a 20 200 b1 b_b 30 300 input2 a_a a/a xxx yyy a1 a1 lll ppp b1 b_b kkk ooo output a_a a/a 10 100 xxx yyy (2 Replies)
Discussion started by: ruby_sgp
2 Replies

8. UNIX for Dummies Questions & Answers

how to join two files using "Join" command with one common field in this problem?

file1: Toronto:12439755:1076359:July 1, 1867:6 Quebec City:7560592:1542056:July 1, 1867:5 Halifax:938134:55284:July 1, 1867:4 Fredericton:751400:72908:July 1, 1867:3 Winnipeg:1170300:647797:July 15, 1870:7 Victoria:4168123:944735:July 20, 1871:10 Charlottetown:137900:5660:July 1, 1873:2... (2 Replies)
Discussion started by: mindfreak
2 Replies

9. UNIX for Dummies Questions & Answers

How to use the the join command to join multiple files by a common column

Hi, I have 20 tab delimited text files that have a common column (column 1). The files are named GSM1.txt through GSM20.txt. Each file has 3 columns (2 other columns in addition to the first common column). I want to write a script to join the files by the first common column so that in the... (5 Replies)
Discussion started by: evelibertine
5 Replies

10. UNIX for Dummies Questions & Answers

Join Command

Hi, Please explain the working process of join command. File 1 P B S A C AFile2 C B P A S DBut the output of join command is... join File1.txt File2.txt P B A S A DBut I guess the output should be P B A S A D C A BPlease correct me,if i am worong or missing some thing. Thanks (2 Replies)
Discussion started by: satyar
2 Replies
MyFrame(1x)						   AfterStep X11 window manager 					       MyFrame(1x)

NAME
MyFrame - defines how AfterStep should construct window's frame CONFIGURATION OPTIONS
AllowBorder Denotes that beveled borders should be drawn around the window frame and titlebar. This is on by default, so this option is only useful in combination with inheriting previously defined window frames. See Also: Inherit MyFrame for details. CondenseTitlebar Left|Right|Center Allows titlebars to be smaller then the size of the window. The parameter defines the Alignment of the whole titlebar. See Also: Alignment flags for further details. Corner [ SouthEast | SouthWest | NorthEast | NorthWest ] "pixmap_name" Specifies the corner of the window frame to be decorated and the pixmap to be used. CornerAlign FIXME: add proper description here. See Also: Alignment flags for further details. CornerBevel Bottom|Extra|NoInline|NoOutline|none|Left|Right|Top Sets the default bevel of a window s frame corners. If you need different bevels for the different window states, use CornerFocusedBevel, CornerUnfocusedBevel, CornerStickyBevel See Also: Bevel flags for further details. CornerFBevel Alias for CornerFocusedBevel. See Also: Bevel flags for further details. CornerFocusedBevel Bottom|Extra|NoInline|NoOutline|none|Left|Right|Top Sets the bevel of the window s frame corners while window is in focused state. If this is not used, values set with CornerBevel will be used. See Also: Bevel flags for further details. CornerSBevel Alias for CornerStickyBevel. See Also: Bevel flags for further details. CornerSize NorthEast|SouthEast|NorthWest|SouthWest|Any WIDTHxHEIGHT FIXME: add proper description here. CornerStickyBevel NorthEast|SouthEast|NorthWest|SouthWest|Any None|[Left,Top,Right,Bottom,Extra,NoOutline] Sets the bevel of the window s frame corners while window is in sticky state. This overwrites any value set with CornerBevel. If this is not used, values set with CornerBevel will be used. See Also: Bevel flags for further details. CornerUBevel Alias for CornerUnfocusedBevel. See Also: Bevel flags for further details. CornerUnfocusedBevel Bottom|Extra|NoInline|NoOutline|none|Left|Right|Top Sets the bevel of the window s frame corners while window is in unfocused state. If this is not used, values set with CornerBevel will be used. See Also: Bevel flags for further details. East "pixmap_name" Specifies the pixmap to be displayed in the right border of the window frame, if DecorateFrames is set. FrameFStyle MyStyle Alias for FrameFocusedStyle. FrameFocusedStyle MyStyle Defines the MyStyle to apply to the window frame if window is in focused state. FrameSStyle MyStyle Alias for FrameStickyStyle. FrameStickyStyle MyStyle Defines the MyStyle to apply to the window frame if window is in sticky state. FrameUStyle MyStyle Alias for FrameUnfocusedStyle. FrameUnfocusedStyle MyStyle Defines the MyStyle to apply to the window frame if window is in unfocused state. Inherit frame_name Specifies a MyFrame to inherit options from. Options from frame_name will override previously specified options for this frame. Inherit is a good way to save memory and network bandwidth if the same BackPixmap is used for several frames, as the pixmap will only be loaded for the inherited frame. InheritDefaults FIXME: add proper description here. LeftBtnAlign Defines the alignment of the left buttons in the titlebar. See Also: Look Alignment flags for further details. LeftBtnBackAlign Defines the alignment of the background of the left buttons. See Also: Alignment flags for further details. LeftBtnBackground Defines the background to be used for the left buttons. LeftSpacerBackAlign Defines the alignment of the background of the (by default) leftmost spacer of the titlebar. See Also: Alignment flags for further details. LeftSpacerBackground Defines the background to be used for the (by default) leftmost spacer of the titlebar. See Also: Titlebar Layout for further details. LeftTitleSpacerBackAlign Defines the alignment of the background of the (by default) inner spacer, left of the window title. See Also: Alignment flags for further details. LeftTitleSpacerBackground Defines the background of the (by default) inner spacer, left of the window title. LeftTitlebarLayout [Buttons] | [Spacer] | [TitleSpacer] Defines the order of the elements in the titlebar left of the window title, where default is Spacer - Buttons - TitleSpacer. See Also: Titlebar Layout Flags for further details. MyFrame " frame_name " frame_option ~MyFrame Specifies the beginning of a frame definition. The frame can be referred to later by frame_name . ~MyFrame ends a frame definition. NoBorder Denotes that beveled borders should not be drawn around the window frame and titlebar. NoCorner FIXME: add proper description here. NoSide FIXME: add proper description here. North "pixmap_name" Specifies the pixmap to be displayed in the top border of the window frame, if DecorateFrames is set. NorthEast "pixmap_name" Specifies the pixmap to be displayed in the top right corner of the window frame, if DecorateFrames is set. NorthWest "pixmap_name" Specifies the pixmap to be displayed in the top left corner of the window frame, if DecorateFrames is set. RightBtnAlign Defines the alignment of the right buttons in the titlebar. See Also: Look Alignment flags for further details. RightBtnBackAlign Defines the alignment of the background of the right buttons. See Also: Alignment flags for further details. RightBtnBackground Defines the background to be used for the right buttons. RightSpacerBackAlign Defines the alignment of the background of the (by default) rightmost spacer of the titlebar. See Also: Alignment flags for further details. RightSpacerBackground Defines the background to be used for the (by default) rightmost spacer of the titlebar. See Also: Titlebar Layout for further details. RightTitleSpacerBackAlign Defines the alignment of the background of the (by default) inner spacer, right of the window title. See Also: Alignment flags for further details. RightTitleSpacerBackground Defines the background of the (by default) inner spacer, right of the window title. RightTitlebarLayout [Buttons] | [Spacer] | [TitleSpacer] Defines the order of the elements in the titlebar left of the window title, where default is TitleSpacer, Buttons, Spacer. See Also: Titlebar Layout Flags for further details. Side [ South | North | East | West ] "pixmap_name" Specifies the side of the window frame to be decorated and the pixmap to be used. SideAlign FIXME: add proper description here. See Also: Alignment flags for further details. SideBevel Bottom|Extra|NoInline|NoOutline|none|Left|Right|Top Sets the default bevel of a window s frame sides. If you need different bevels for the different window states, use SideFocusedBevel, SideUnfocusedBevel, SideStickyBevel See Also: Bevel flags for further details. SideFBevel Alias for SideFocusedBevel. See Also: Bevel flags for further details. SideFocusedBevel Bottom|Extra|NoInline|NoOutline|none|Left|Right|Top Sets the bevel of the window s frame sides while window is in focused state. If this is not used, values set with SideBevel will be used. See Also: Bevel flags for further details. SideSBevel Alias for SideStickyBevel. See Also: Bevel flags for further details. SideSize FIXME: add proper description here. SideSlicing FIXME: add proper description here. SideStickyBevel Bottom|Extra|NoInline|NoOutline|none|Left|Right|Top Sets the bevel of the window s frame sides while window is in sticky state. If this is not used, values set with SideBevel will be used. See Also: Bevel flags for further details. SideUBevel Alias for SideUnfocusedBevel. See Also: Bevel flags for further details. SideUnfocusedBevel Bottom|Extra|NoInline|NoOutline|none|Left|Right|Top Sets the bevel of the window s frame sides while window is in unfocused state. If this is not used, values set with SideBevel will be used. See Also: Bevel flags for further details. South "pixmap_name" Specifies the pixmap to be displayed in the bottom border of the window frame, if DecorateFrames is set. SouthEast "pixmap_name" Specifies the pixmap to be displayed in the bottom right corner of the window frame, if DecorateFrames is set. SouthWest "pixmap_name" Specifies the pixmap to be displayed in the bottom left corner of the window frame, if DecorateFrames is set. TitleAlign FIXME: add proper description here. See Also: Alignment flags for further details. TitleBackground Defines the background to be used for the window title. TitleBackgroundAlign Defines the alignment of the background of the window title. See Also: Alignment flags for further details. TitleBevel Determines the bevel to be drawn around the title bar. If you wish to have different bevels, depending on the window s state, use TitleFocusedBevel, TitleUnfocusedBevel or TitleStickyBevel. See Also: Bevel flags for further details. TitleCompositionMethod FIXME: add proper description here. TitleFBevel Alias for TitleFocusedBevel. See Also: Bevel flags for further details. TitleFCompositionMethod Alias for TitleFocusedCompositionMethod. TitleFHue Alias for TitleFocusedHue. TitleFSaturation Alias for TitleFocusedSaturation. TitleFStyle MyStyle Alias for TitleFocusedStyle. TitleFocusedBevel Determines the bevel to be drawn around the title bar if window is in focused state. See Also: Bevel flags for further details. TitleFocusedCompositionMethod FIXME: add proper description here. TitleFocusedHue FIXME: add proper description here. TitleFocusedSaturation FIXME: add proper description here. TitleFocusedStyle MyStyle MyStyle to apply to titlebar if window is in focused state. TitleHSpacing value Defines the space in pixel to insert between window title and the buttons/spacers. Please note that CondenseTitlebar is influencing the behaviour of this option. TitleSBevel Alias for TitleStickyBevel. See Also: Bevel flags for further details. TitleSCompositionMethod Alias for TitleStickyCompositionMethod. TitleSHue Alias for TitleStickyHue. TitleSSaturation Alias for TitleStickySaturation. TitleSStyle MyStyle Alias for TitleStickyStyle. TitleStickyBevel Determines the bevel to be drawn around the title bar if window is in unfocused state. See Also: Bevel flags for further details. TitleStickyCompositionMethod FIXME: add proper description here. TitleStickyHue FIXME: add proper description here. TitleStickySaturation FIXME: add proper description here. TitleStickyStyle MyStyle MyStyle to apply to titlebar if window is in sticky state. TitleUBevel Alias for TitleUnfocusedBevel. See Also: Bevel flags for further details. TitleUCompositionMethod Alias for TitleUnfocusedCompositionMethod. TitleUHue Alias for TitleUnfocusedHue. TitleUSaturation Alias for TitleUnfocusedSaturation. TitleUStyle MyStyle Alias for TitleUnfocusedStyle. TitleUnfocusedBevel Determines the bevel to be drawn around the title bar if window is in unfocused state. See Also: Bevel flags for further details. TitleUnfocusedCompositionMethod FIXME: add proper description here. TitleUnfocusedHue FIXME: add proper description here. TitleUnfocusedSaturation FIXME: add proper description here. TitleUnfocusedStyle MyStyle MyStyle to apply to titlebar if window is in unfocused state. TitleVSpacing value West "pixmap_name" Specifies the pixmap to be displayed in the left border of the window frame, if DecorateFrames is set. Window frame decorations (aka MyFrame) Each window is surrounded by so-called frame decoration. each frame decoration could be built from 9 TBars: 1) Main Titlebar with icons on left, label in the middle and icons on right. Label may also have special underlying image - so called Title Background. Ordering of this elements is set by TitleButtonOrder setting ( see below ). 2) 4 frame sides. Each of this have fixed width that is determined by SideSize setting or image size if SideSize is ommited. Second dimension of the TBar changes to match the size of the window. 3) 4 frame corners. Each of this have both fixed width and height, as determined by CornerSize setting or image size. Each of above elements is rendered by generating background using respective MyStyle, and then overlaying images/buttons and text on top of it. Default overlaying is done using composition method alpha-blend. In case of main Titlebar that could be changed. Bevel is then drawn on top of the image as specified in respective setting. MyFrame allows different MyStyles to be used for titlebar and frame decorations. If any of those are ommited - default setting from FWindowStyle/UWindowStyle/SWindowStyle will be used. Important: If you use semi-transparent images for frame sides - they will be overlayed on top of MyStyle generated background, so if you want it to be overlayed over root background - you should use MyStyle with BackPixmap set to 129 or 149. Also note that unless you use MYStyle with BackPixmap 126 and 125 - frame decorations will not be shaped. Likewise if you want frame part to have only the shape of the image, you specified, with no background at all - use MyStyle with BackPixmap set like so : BackPixmap 126 empty.xpm Where empty.xpm is 1x1 completely transparent image (supplied as desktop/icons/common/empty.xpm ). To identify side/corner it is possible to use abbreviations, such as: N, NW, SW, etc. All the CompositionMethod settings must have one of the BackPixmap types from MyStyles ( ie 130-143 ) Align setting may have different meaning/capabilities for different items. When applied to text - it simply aligns text to sides mentioned. When applied to image - such as title background or frame side pixmap - it also specifies if image should be tiled, scaled or left same size. Make sure that you use HTiled,VTiled or HScaled,VScaled for frame sides - otherwise images on they will not be resized to match window size (this is also a feature :). To center item specify Align to include both sides. For example : Align Left,Right will center item horizontally. Note that TitleBackground option allows you to specify an image to be used under titlebar label in addition to the MyStyle. This was done for better shaped titlebars. You may have MyStyle to be completely transparent shape, while TitleBackground some non-transpar- ent image, and that will provide better visibility for the titlebar text. MyFrame "name" Inherit "name"] #traditional form : [North ] [East ] [South ] [West ] [NorthEast ] [NorthWest ] [SouthEast ] [SouthWest ] #alternative form : [Side North|South|East|West|Any []] if pixmap is ommited - empty bevel will be drawn [NoSide North|South|East|West|Any] [Corner NorthEast|SouthEast|NorthWest|SouthWest|Any ] if pixmap is ommited - empty bevel will be drawn [NoCorner NorthEast|SouthEast|NorthWest|SouthWest|Any] #new settings : [TitleUnfocusedStyle ] [TitleFocusedStyle ] [TitleStickyStyle ] [FrameUnfocusedStyle ] [FrameFocusedStyle ] [FrameStickyStyle ] [TitleBackground ] gets overlayed over background and under the text [LeftBtnBackground ] gets overlayed over background and under the left block of buttons [LeftSpacerBackground ] gets overlayed over background between left block of buttons and text label [RightSpacerBackground ] gets overlayed over background between right block of buttons and text label [RightBtnBackground ] gets overlayed over background and under the right block of buttons #additional attributes : [SideSize North|South|East|West|Any 3rd Berkeley Distribution AfterStep v.2.2.11 MyFrame(1x)
All times are GMT -4. The time now is 12:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy