Sponsored Content
Full Discussion: Formatting of output
Top Forums Shell Programming and Scripting Formatting of output Post 302947509 by RavinderSingh13 on Thursday 18th of June 2015 11:04:06 AM
Old 06-18-2015
Hello james2009,

Kindly use code tags as per forum rules for your codes/inputs/commands in your posts.
Following may help you in same.
Code:
 awk 'FNR==NR{if(NR>1){A[$1]=A[$1]?A[$1] OFS $NF:$NF;next}} ($1 in A){print $1 ":" A[$1];delete A[$1]}' OFS=,  Input_file Input_file

Output will be as follows.
Code:
8781:4319,2332,0269
5550:3282,9465,7607
7064:4456

Thanks,
R. Singh

Last edited by RavinderSingh13; 06-18-2015 at 12:09 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Formatting the output

Hi all, Have the following code(1) producing the results(2 & 3). Would like to know if there is a way to format the two reports created in a similar fashion. IE - The first is formatted nicely as a result of the echo "$xmpbdate $xavgs" >> $xmpbrpt However when I attempt to do the same on... (7 Replies)
Discussion started by: Cameron
7 Replies

2. Shell Programming and Scripting

formatting output

Hi need some advice.. #grep -i hostname test.csv (gives the below output) HOSTNAME,name,host_test,,,,,,,, Now I need to format the above output as below. HOSTNAME: name=host_test Any easy way of doing this using awk or sed or printf? (4 Replies)
Discussion started by: balaji_prk
4 Replies

3. Shell Programming and Scripting

Formatting Output

Hi I tried running the below awk 'BEGIN { printf ("%s %-51s %s %-7s %s",$var1,$var2,$var3,$var4,$var5)}' from the command prompt and it is not working. Getting the error awk: Field $() is not correct. The source line number is 1. Actually my requirement is to form a string based on... (6 Replies)
Discussion started by: dhanamurthy
6 Replies

4. Shell Programming and Scripting

more help with formatting ls output...

Ok, for a fun project, my goal is to replicate the style of "catalog" on an old apple ] *A 002 SOMEAPPLESOFTFILE B 004 SOMEFILE T 006 SOMETEXT I 002 SOMEINTEGERFILE The first character is either " " or "*" depending on if the file is locked or not. Next is the filetype, so in... (1 Reply)
Discussion started by: patrick99e99
1 Replies

5. Shell Programming and Scripting

Formatting ls output

I am using find and ls to search for "warez" files on my server. find /home/ -regex ".*\.\(avi\|mp3\|mpeg\|mpg\|iso\)" -print0 | xargs -0 ls -oh This command produces this: -rw-r--r-- 1 1000 3.2M Feb 18 2009 /home/user/public_html/lupus.mp3 I want to only get this 3.2M... (4 Replies)
Discussion started by: bonrad
4 Replies

6. Shell Programming and Scripting

formatting output

Sorry for being a n00b, but I'm having a lot more trouble than I should with formatting the output to the program I finally completed. I'm basically looking for the linux equivalent to setw( ) from c++ so that I can print things in columns like this (but without the underlines lol): MISSPELLED: ... (4 Replies)
Discussion started by: aikaterinimak
4 Replies

7. Shell Programming and Scripting

Formatting of output

Hi Experts, I have to create a report for certain audit and my output looks as follows I m trying to format my output to look like Any inputs would be highly appreciated Thanks Syed (5 Replies)
Discussion started by: maverick_here
5 Replies

8. Shell Programming and Scripting

Output Formatting

Hi Guys I need help removing some lines from output i am receiving from a shell script. Here is the output: http://i52.tinypic.com/10z0fut.png I am trying to remove the output that i have circled. . ${EDW}/extracts/bin/extracts_setup2.sh . ${EDW}/extracts/extracts.conf ... (7 Replies)
Discussion started by: mooey1232003
7 Replies

9. Shell Programming and Scripting

Formatting the output

Hi, I have a file which contents entries in this form. Only in /data4/temp abc.000001 Only in /data4/temp abc.000003 Only in /data4/temp abc.000012 Only in /data4/temp abc.000120 Only in /data4/temp abc.000133 Only in /data4/temp abc.001444 i want to read line by line and format... (2 Replies)
Discussion started by: arijitsaha
2 Replies

10. Shell Programming and Scripting

Formatting the Output

Hi, I am trying to use printf command and format certain output in a specific format as under: While the left side (upto |) of the above format is part of a fixed header function, the right side is where i am expecting data to be printed. However, as seen, Row1 value is reflecting on last... (5 Replies)
Discussion started by: EmbedUX
5 Replies
wxListCtrl(3erl)					     Erlang Module Definition						  wxListCtrl(3erl)

NAME
wxListCtrl - See external documentation: wxListCtrl. DESCRIPTION
See external documentation: wxListCtrl . This class is derived (and can use functions) from: wxControl wxWindow wxEvtHandler DATA TYPES
wxListCtrl() : An object reference, The representation is internal and can be changed without notice. It can't be used for comparsion stored on disc or distributed for use on other nodes. EXPORTS
new() -> wxListCtrl() See external documentation . new(Parent::wxWindow() (see module wxWindow)) -> wxListCtrl() Equivalent to new(Parent, []) . new(Parent::wxWindow() (see module wxWindow), Options::[Option]) -> wxListCtrl() Types Option = {winid, integer()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx() (see module wx)} See external documentation . arrange(This::wxListCtrl()) -> bool() Equivalent to arrange(This, []) . arrange(This::wxListCtrl(), Options::[Option]) -> bool() Types Option = {flag, integer()} See external documentation . assignImageList(This::wxListCtrl(), ImageList::wxImageList() (see module wxImageList), Which::integer()) -> ok See external documentation . clearAll(This::wxListCtrl()) -> ok See external documentation . create(This::wxListCtrl(), Parent::wxWindow() (see module wxWindow)) -> bool() Equivalent to create(This, Parent, []) . create(This::wxListCtrl(), Parent::wxWindow() (see module wxWindow), Options::[Option]) -> bool() Types Option = {winid, integer()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx() (see module wx)} See external documentation . deleteAllItems(This::wxListCtrl()) -> bool() See external documentation . deleteColumn(This::wxListCtrl(), Col::integer()) -> bool() See external documentation . deleteItem(This::wxListCtrl(), Item::integer()) -> bool() See external documentation . editLabel(This::wxListCtrl(), Item::integer()) -> wxTextCtrl() (see module wxTextCtrl) See external documentation . ensureVisible(This::wxListCtrl(), Item::integer()) -> bool() See external documentation . findItem(This::wxListCtrl(), Start::integer(), Str::string()) -> integer() Equivalent to findItem(This, Start, Str, []) . findItem(This::wxListCtrl(), Start::integer(), X::string() | term(), X::term() | integer()) -> integer() See external documentation . Alternatives: findItem(This::wxListCtrl(), Start::integer(), Str::string(), [Option]) -> integer() Option = {partial, bool()} findItem(This::wxListCtrl(), Start::integer(), Pt::{X::integer(),Y::integer()}, Direction::integer()) -> integer() getColumn(This::wxListCtrl(), Col::integer(), Item::wxListItem() (see module wxListItem)) -> bool() See external documentation . getColumnCount(This::wxListCtrl()) -> integer() See external documentation . getColumnWidth(This::wxListCtrl(), Col::integer()) -> integer() See external documentation . getCountPerPage(This::wxListCtrl()) -> integer() See external documentation . getEditControl(This::wxListCtrl()) -> wxTextCtrl() (see module wxTextCtrl) See external documentation . getImageList(This::wxListCtrl(), Which::integer()) -> wxImageList() (see module wxImageList) See external documentation . getItem(This::wxListCtrl(), Info::wxListItem() (see module wxListItem)) -> bool() See external documentation . getItemBackgroundColour(This::wxListCtrl(), Item::integer()) -> colour() (see module wx) See external documentation . getItemCount(This::wxListCtrl()) -> integer() See external documentation . getItemData(This::wxListCtrl(), Item::integer()) -> integer() See external documentation . getItemFont(This::wxListCtrl(), Item::integer()) -> wxFont() (see module wxFont) See external documentation . getItemPosition(This::wxListCtrl(), Item::integer(), Pos::{X::integer(), Y::integer()}) -> bool() See external documentation . getItemRect(This::wxListCtrl(), Item::integer(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}) -> bool() Equivalent to getItemRect(This, Item, Rect, []) . getItemRect(This::wxListCtrl(), Item::integer(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}, Options::[Option]) -> bool() Types Option = {code, integer()} See external documentation . getItemSpacing(This::wxListCtrl()) -> {W::integer(), H::integer()} See external documentation . getItemState(This::wxListCtrl(), Item::integer(), StateMask::integer()) -> integer() See external documentation . getItemText(This::wxListCtrl(), Item::integer()) -> string() See external documentation . getItemTextColour(This::wxListCtrl(), Item::integer()) -> colour() (see module wx) See external documentation . getNextItem(This::wxListCtrl(), Item::integer()) -> integer() Equivalent to getNextItem(This, Item, []) . getNextItem(This::wxListCtrl(), Item::integer(), Options::[Option]) -> integer() Types Option = {geometry, integer()} | {state, integer()} See external documentation . getSelectedItemCount(This::wxListCtrl()) -> integer() See external documentation . getTextColour(This::wxListCtrl()) -> colour() (see module wx) See external documentation . getTopItem(This::wxListCtrl()) -> integer() See external documentation . getViewRect(This::wxListCtrl()) -> {X::integer(), Y::integer(), W::integer(), H::integer()} See external documentation . hitTest(This::wxListCtrl(), Point::{X::integer(), Y::integer()}) -> {integer(), Flags::integer()} See external documentation . insertColumn(This::wxListCtrl(), Col::integer(), X::string() | term()) -> integer() See external documentation . Alternatives: insertColumn(This::wxListCtrl(), Col::integer(), Heading::string()) -> insertColumn(This,Col,Heading, []) insertColumn(This::wxListCtrl(), Col::integer(), Info::wxListItem:wxListItem()) -> integer() insertColumn(This::wxListCtrl(), Col::integer(), Heading::string(), Options::[Option]) -> integer() Types Option = {format, integer()} | {width, integer()} See external documentation . insertItem(This::wxListCtrl(), Info::wxListItem() (see module wxListItem)) -> integer() See external documentation . insertItem(This::wxListCtrl(), Index::integer(), X::integer() | string()) -> integer() See external documentation . Alternatives: insertItem(This::wxListCtrl(), Index::integer(), ImageIndex::integer()) -> integer() insertItem(This::wxListCtrl(), Index::integer(), Label::string()) -> integer() insertItem(This::wxListCtrl(), Index::integer(), Label::string(), ImageIndex::integer()) -> integer() See external documentation . refreshItem(This::wxListCtrl(), Item::integer()) -> ok See external documentation . refreshItems(This::wxListCtrl(), ItemFrom::integer(), ItemTo::integer()) -> ok See external documentation . scrollList(This::wxListCtrl(), Dx::integer(), Dy::integer()) -> bool() See external documentation . setBackgroundColour(This::wxListCtrl(), Colour::colour() (see module wx)) -> bool() See external documentation . setColumn(This::wxListCtrl(), Col::integer(), Item::wxListItem() (see module wxListItem)) -> bool() See external documentation . setColumnWidth(This::wxListCtrl(), Col::integer(), Width::integer()) -> bool() See external documentation . setImageList(This::wxListCtrl(), ImageList::wxImageList() (see module wxImageList), Which::integer()) -> ok See external documentation . setItem(This::wxListCtrl(), Info::wxListItem() (see module wxListItem)) -> bool() See external documentation . setItem(This::wxListCtrl(), Index::integer(), Col::integer(), Label::string()) -> integer() Equivalent to setItem(This, Index, Col, Label, []) . setItem(This::wxListCtrl(), Index::integer(), Col::integer(), Label::string(), Options::[Option]) -> integer() Types Option = {imageId, integer()} See external documentation . setItemBackgroundColour(This::wxListCtrl(), Item::integer(), Col::colour() (see module wx)) -> ok See external documentation . setItemCount(This::wxListCtrl(), Count::integer()) -> ok See external documentation . setItemData(This::wxListCtrl(), Item::integer(), Data::integer()) -> bool() See external documentation . setItemFont(This::wxListCtrl(), Item::integer(), F::wxFont() (see module wxFont)) -> ok See external documentation . setItemImage(This::wxListCtrl(), Item::integer(), Image::integer()) -> bool() Equivalent to setItemImage(This, Item, Image, []) . setItemImage(This::wxListCtrl(), Item::integer(), Image::integer(), Options::[Option]) -> bool() Types Option = {selImage, integer()} See external documentation . setItemColumnImage(This::wxListCtrl(), Item::integer(), Column::integer(), Image::integer()) -> bool() See external documentation . setItemPosition(This::wxListCtrl(), Item::integer(), Pos::{X::integer(), Y::integer()}) -> bool() See external documentation . setItemState(This::wxListCtrl(), Item::integer(), State::integer(), StateMask::integer()) -> bool() See external documentation . setItemText(This::wxListCtrl(), Item::integer(), Str::string()) -> ok See external documentation . setItemTextColour(This::wxListCtrl(), Item::integer(), Col::colour() (see module wx)) -> ok See external documentation . setSingleStyle(This::wxListCtrl(), Style::integer()) -> ok Equivalent to setSingleStyle(This, Style, []) . setSingleStyle(This::wxListCtrl(), Style::integer(), Options::[Option]) -> ok Types Option = {add, bool()} See external documentation . setTextColour(This::wxListCtrl(), Col::colour() (see module wx)) -> ok See external documentation . setWindowStyleFlag(This::wxListCtrl(), Style::integer()) -> ok See external documentation . sortItems(This::wxListCtrl(), SortCallBack::function()) -> boolean() Sort the items in the list control SortCalBack(Item1,Item2) -> integer() SortCallBack receives the client data associated with two items to compare, and should return 0 if the items are equal, a negative value if the first item is less than the second one and a positive value if the first item is greater than the second one. NOTE: The callback may not call other processes. destroy(This::wxListCtrl()) -> ok Destroys this object, do not use object again AUTHORS
<> wxErlang 0.98.9 wxListCtrl(3erl)
All times are GMT -4. The time now is 03:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy