Sponsored Content
Full Discussion: Text Conversion in Column
Top Forums Shell Programming and Scripting Text Conversion in Column Post 302918360 by Don Cragun on Tuesday 23rd of September 2014 04:10:21 AM
Old 09-23-2014
What have you tried?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

column to row conversion with additional pattern

Hi there, I've an input file1 as follows: 1001 1002 1003 1004 1005 I would like to have an output file2 as follows: Numbers are 1001/ 1002/ 1003/ 1004/ 1005/ Any help is appreciated. (2 Replies)
Discussion started by: kbirde
2 Replies

2. Shell Programming and Scripting

Text to xlsx conversion

Hi Guys, The code snippet below is working fine with xls 2003 but the same is not working in xlsx 2007. Can someone please help. #Convert .txt file format to .xls format awk 'BEGIN{ FS="|" cols=8 print "<HTML><style type=\"text/css\">td{mso-number-format:\"\@\"}</style><BODY><TABLE... (1 Reply)
Discussion started by: icefish
1 Replies

3. UNIX for Dummies Questions & Answers

converting unique identifiers in a column using conversion file

Hello, I often have this problem: I have a file with a column of unique identifiers e.g. file1 below has an id column and data column/columns with p rows: cat data1 dog data2 cow data3 . . . elephant datap-1 horse datap and I have a conversion file,file2, with n<p rows... (4 Replies)
Discussion started by: peanuts48
4 Replies

4. Shell Programming and Scripting

text to csv conversion

Thank u every body ......just need a help so that a text file needs to be converted into CSV............. my log file is as follows Host scsi3: usb-storage Vendor: Maxtor Product: OneTouch III Serial Number: 044303E5 Protocol: Transparent SCSI Transport: Bulk ... (4 Replies)
Discussion started by: tangotango
4 Replies

5. Shell Programming and Scripting

Lines to Column conversion

Hi All, I have a sample file with content: # cat test1.txt mahesh suresh anil # I need to get it like this: m s a a u n h r i e e l s s h h Basically row to column and column to row. I am trying to use this: while read line do echo $line | fold -bw 1 (2 Replies)
Discussion started by: digitalrg
2 Replies

6. Shell Programming and Scripting

Row to Column conversion?

I have a text file with the geneIds separated by space in each line. The number Ids in lines are different. The file is like: abc qwe tyu ghj jkl dfg sdf cvb sdk fgh tyu uio iop tyu rty eru wer rty iop asd sdf dfg fgh zxc I want to format the file like: abc qwe tyu ghj jkl ... (7 Replies)
Discussion started by: sammy777
7 Replies

7. Solaris

Rows to column conversion in Solaris

i am using the command pkginfo -l | /usr/xpg4/bin/grep -e 'VENDOR' -e 'NAME' -e 'VERSION' >> /tmp/test1.txt in order to get name,vendor and version of the applications installed on Solaris machine.The output stored in test1.txt in as shown below: NAME: Solaris Zones (Usr) VERSION: ... (4 Replies)
Discussion started by: omkar.jadhav
4 Replies

8. UNIX for Dummies Questions & Answers

[Solved] Uneven column to row conversion

Hi Unix Forum, I have a relatively easy question i suppose for which, however, until now i could not find a solution. I am working with a program that will give me an output file similar to the following: A 1 2 3 4 B 1 2 3 4 C 1 (9 Replies)
Discussion started by: Leander
9 Replies

9. Shell Programming and Scripting

Conversion if 1st column is match (awk '{s+=$1} END

Hi im trying to add numbers, got no problem with it im using awk '{s+=$1} END {print s, "MB"}', but what if the numbers are like mention below. who will i add them 2000 KB 1 MB Answer: 2001 Desired: 2000 KB 1 MB Answer: 3000 (4 Replies)
Discussion started by: invinzin21
4 Replies

10. UNIX for Advanced & Expert Users

Conversion of rows to columns using awk based om column value

HI, My Input file data is dn:adcfgeneral id:13343 Name:xxxxxx Password:iutyerwuitywue wpuwt tuiytruityrutyrwtyrwp dn:cdferwjyyyy id:3875 Name:yyyy Password :hgfdsjkfhdsfkdlshf dshfkldshfdklsfh interset:uiuiufj My output should be ... (6 Replies)
Discussion started by: dineshaila
6 Replies
Optionmenu(3)						User Contributed Perl Documentation					     Optionmenu(3)

NAME
Tk::Optionmenu - Let the user select one of some predefined options values SYNOPSIS
use Tk::Optionmenu; $opt = $w->Optionmenu( -options => REFERENCE_to_OPTIONLIST, -command => CALLBACK, -variable => SCALAR_REF, ); $opt->addOptions( OPTIONLIST ); # OPTION LIST is # a) $val1, $val2, $val3,... # b) [ $lab1=>$val1], [$lab2=>val2], ... ] # c) combination of a) and b), e.g., # val1, [$lab2=>val2], val3, val4, [...], ... DESCRIPTION
The Optionmenu widget allows the user chose between a given set of options. If the user should be able to change the available option have a look at Tk::BrowseEntry. OPTIONS
-options (Re)sets the list of options presented. -command Defines the callback that is invokes when a new option is selected. -variable Reference to a scalar that contains the current value of the selected option. -textvariable Reference to a scalar that contains the text label of the current value of the selected option. METHODS
addOptions Adds OPTION_LIST to the already available options. EXAMPLE
use Tk; my $mw = MainWindow->new(); my ($var, $tvar); my $opt = $mw->Optionmenu( -options => [[jan=>1], [feb=>2], [mar=>3], [apr=>4]], -command => sub { print "got: ", shift, " " }, -variable => $var, -textvariable => $tvar )->pack; $opt->addOptions([may=>5],[jun=>6],[jul=>7],[aug=>8]); my $f = $mw->Frame(-relief=>'groove', -borderwidth => 2)->pack; $f->Label(-textvariable=>$tvar)->pack(-side => 'left'); $f->Label(-text => " -> ")->pack(-side => 'left'); $f->Label(-textvariable=>$var)->pack(-side => 'left'); $mw->Button(-text=>'Exit', -command=>sub{$mw->destroy})->pack; MainLoop; SEE ALSO
Tk::Menubutton, Tk::BrowseEntry perl v5.16.3 2014-06-10 Optionmenu(3)
All times are GMT -4. The time now is 05:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy