Sponsored Content
Top Forums Shell Programming and Scripting Duplicate each field in a text file Post 302546655 by hydrabane on Thursday 11th of August 2011 07:44:36 PM
Old 08-11-2011
Duplicate each field in a text file

Hello all,

I am searching for a solution to the following problem:

Given input such as this:
Quote:
entry1 entry2 entry3 entry4
I would like to find a way to output this:

Quote:
entry1 entry1 entry2 entry2 entry3 entry3 entry4 entry4
Thanks in advance!
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Duplicate records from oracle to text file.

Hi, I want to fetch duplicate records from an external table to a text file. Pls suggest me. Thanks (1 Reply)
Discussion started by: shilendrajadon
1 Replies

2. Shell Programming and Scripting

Eleminating Duplicate IPs from a text file

Hey Guys I need to eleminate duplicate IP's from a text file using bash.Any suggestions.Appreciate your help guys. --CoolKid (4 Replies)
Discussion started by: coolkid
4 Replies

3. Shell Programming and Scripting

duplicate line in a text file

i would like to scan file in for duplicate lines, and print the duplicates to another file, oh and it has to be case insensitive. example line1 line2 line2 line3 line4 line4 outputfile: line2 line4 any ideas (5 Replies)
Discussion started by: nixguy
5 Replies

4. Shell Programming and Scripting

How to find Duplicate Records in a text file

Hi all pls help me by providing soln for my problem I'm having a text file which contains duplicate records . Example: abc 1000 3452 2463 2343 2176 7654 3452 8765 5643 3452 abc 1000 3452 2463 2343 2176 7654 3452 8765 5643 3452 tas 3420 3562 ... (1 Reply)
Discussion started by: G.Aavudai
1 Replies

5. Shell Programming and Scripting

Shellscript to sort duplicate files listed in a text file

I have many pdf's scattered across 4 machines. There is 1 location where I have other Pdf's maintained. But the issues it the 4 machines may have duplicate pdf's among themselves, but I want just 1 copy of each so that they can be transfered to that 1 location. What I have thought is: 1) I have... (11 Replies)
Discussion started by: deaddevil
11 Replies

6. Shell Programming and Scripting

How to sum particular field in text file?

how to sum particular field in text file i am having text file like 222|4000|abc 333|5000|xyz 444|6000|mno i want sum of second field i.e 4000+5000+6000 can u pls help (3 Replies)
Discussion started by: suryanarayana
3 Replies

7. Shell Programming and Scripting

Duplicate rows in a text file

notes: i am using cygwin and notepad++ only for checking this and my OS is XP. #!/bin/bash typeset -i totalvalue=(wc -w /cygdrive/c/cygwinfiles/database.txt) typeset -i totallines=(wc -l /cygdrive/c/cygwinfiles/database.txt) typeset -i columnlines=`expr $totalvalue / $totallines` awk -F' ' -v... (5 Replies)
Discussion started by: whitecross
5 Replies

8. Shell Programming and Scripting

How to remove duplicate text blocks from a file?

Hi All I have a list of files which will have duplicate list of blocks of text. Following is a sample of the file, I have removed the sensitive information from the file. All the code samples starts from <TR BGCOLOR="white"> and Ends with IP address and two html tags like this. 10.14.22.22... (3 Replies)
Discussion started by: mahasona
3 Replies

9. Shell Programming and Scripting

Removing duplicate sequences and modifying a text file

Hi. I've tried several different programs to try and solve this problem, but none of them seem to have done exactly what I want (and I need the file in a very specific format). I have a large file of DNA sequences in a multifasta file like this, with around 15 000 genes: ... (2 Replies)
Discussion started by: 4galaxy7
2 Replies

10. Shell Programming and Scripting

Sum duplicate values in text file through awk between dates

I need to sum values in text file in case duplicate row are present with same name and different value below is example of data in file i have and format i need. Data in text file 20170308 PM,U,2 PM,U,113 PM,I,123 DA,U,135 DA,I,113 DA,I,1 20170309 PM,U,2 PM,U,1 PM,I,123 PM,I,1... (3 Replies)
Discussion started by: Adfire
3 Replies
iwidgets::labeledframe(1)					  [incr Widgets]					 iwidgets::labeledframe(1)

__________________________________________________________________________________________________________________________________________________

NAME
iwidgets::labeledframe - Create and manipulate a labeled frame widget SYNOPSIS
iwidgets::labeledframe pathName ?options? INHERITANCE
itk::Archetype <- iwidgets::Labeledframe STANDARD OPTIONS
background borderwidth cursor foreground relief See the "options" manual entry for details on the standard options. WIDGET-SPECIFIC OPTIONS Name: iPadX Class: IPad Command-Line Switch: -ipadx Specifies horizontal padding space between the border and the childsite. The value may have any of the forms acceptable to Tk_Get- Pixels. The default is 0. Name: iPadY Class: IPad Command-Line Switch: -ipady Specifies vertical padding space between the border and the childsite. The value may have any of the forms acceptable to Tk_GetPix- els. The default is 0. Name: labelBitmap Class: Bitmap Command-Line Switch: -labelbitmap Specifies a bitmap to display in the label, in any of the forms acceptable to Tk_GetBitmap. This option overrides the labeltext option. Name: labelImage Class: Image Command-Line Switch: -labelimage Specifies a image to be used as the label. The image may be any of the values created by the image create command. This option overrides both the labelbitmap and labeletext options. Name: labelMargin Class: Margin Command-Line Switch: -labelmargin Specifies the distance between the inner ede of the hull frames relief, and the label in any of the forms acceptable to Tk_GetPix- els. The default is 10 pixels. Name: labelText Class: Text Command-Line Switch: -labeltext Specifies the text of the label around the childsite. Name: labelVariable Class: Variable Command-Line Switch: -labelvariable Specifies the text variable of the label around the childsite. Name: labelFont Class: Font Command-Line Switch: -labelfont Specifies the font of the label around the childsite. Name: labelPos Class: Position Command-Line Switch: -labelpos Specifies the position of the label within the grooved relief of the hull widget. ne, n, nw, se, s, sw, en, e, es, wn, w, ws Default is n. __________________________________________________________________________________________________________________________________________________ DESCRIPTION
The iwidgets::labeledframe command creates a hull frame with a grooved relief, a label positioned within the grooved relief of the hull frame, and a frame childsite. The frame childsite can filled with any widget via a derived class or though the use of the childsite method. This class was designed to be a general purpose base class for supporting the combination of labeled frame and a childsite. The options include the ability to position the label at configurable locations within the grooved relief of the hull frame, and control the display of the label. METHODS
The iwidgets::labeledframe command creates a new Tcl command whose name is pathName. This command may be used to invoke various operations on the widget. It has the following general form: pathName option ?arg arg ...? Option and the args determine the exact behavior of the command. The following commands are possible for labeledframe widgets: WIDGET-SPECIFIC METHODS pathName childsite Return the path name of the child site. pathName cget option Returns the current value of the configuration option given by option. Option may have any of the values accepted by the iwid- gets::labeledframe command. pathName configure ?option? ?value option value ...? Query or modify the configuration options of the widget. If no option is specified, returns a list describing all of the available options for pathName (see Tk_ConfigureInfo for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the iwidgets::labeledframe command. COMPONENTS
Name: label Class: label The label component provides the label for the labeled widget. See the "label" widget manual entry for details on the label compo- nent item. EXAMPLE
The labeledframe was primarily meant to be a base class. The Radiobox is a good example of a derived classe of the labeledframe class. In order to provide equal support for composite classes, the 'childsite' methods also exists. The following is an example of 'childsite' method usage. package require Iwidgets 4.0 iwidgets::labeledframe .lw -labeltext "Entry Frame" -labelpos n pack .lw -fill both -expand yes -padx 10 -pady 10 set cs [.lw childsite] pack [iwidgets::entryfield $cs.entry1 -labeltext "Name:"] -side top -fill x pack [iwidgets::spinint $cs.entry2 -labeltext "Number:"] -side top -fill x pack [iwidgets::pushbutton $cs.entry3 -text "Details:"] -side top -fill x AUTHOR
John A. Tucker KEYWORDS
labeledframe, widget Tk iwidgets::labeledframe(1)
All times are GMT -4. The time now is 12:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy