Sponsored Content
Full Discussion: Spacing between words
Top Forums Shell Programming and Scripting Spacing between words Post 302480184 by ripat on Tuesday 14th of December 2010 07:37:00 AM
Old 12-14-2010
After having RTFM I think I understand how it ARGV works. It looks übergeek for sure! Nice the way how you calculate the maximum line length.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

spacing question

hi , i have follwing strings in a text file hello i am cool hey i am cool arrey i am cool in all the above 3 i wanna retrieve cool.......for this i used split(/ /) but it takes into consideration only one space.......is there any regular expression to do the trcik? ... (7 Replies)
Discussion started by: vivekshankar
7 Replies

2. Shell Programming and Scripting

character spacing issue

I have a script that has a counter in it, the output from the script puts the values in columns, and when the values are greater than 9 it moves the rest of the row over, hence displacing the columns. Is their something I can do to make these values fit in their respective column? I tried typing an... (1 Reply)
Discussion started by: wxornot
1 Replies

3. Shell Programming and Scripting

How to adjust spacing

Is there a way to adjust spacing of a line using k shell? e.g I have a file below $ cat file1 AAA BBB CCC A B C AAAA BB CC I want each word to be adjusted with spaces to have 10 character length like below: AAA BBB CCC A B C AAAA BB CC Any... (4 Replies)
Discussion started by: stevefox
4 Replies

4. Shell Programming and Scripting

spacing problem

Hi guys, I have this little code: for directory in / $(echo $path | tr '/' ' ' ) do cd $directory echo "$(ls -ld | cut -c2-10 | sed 's/.\{3\}/& /' | sed 's/.\{7\}/& /' | sed 's/.\{1\}/& /g')" " $directory" done The output of this will be showing the permissions with spaces so it will... (2 Replies)
Discussion started by: darkhider
2 Replies

5. UNIX for Dummies Questions & Answers

Help with the spacing

while IFS="" read r; do printf "XXX\t%s\n" "$r" done < test1.txt > test.txt The issue is, XXX wud be a dummy column/row added to the file..But i want this XXX column to be a separated as a TAB Delimiter it should be something like XXX 1 XXX 2 (3 Replies)
Discussion started by: saggiboy10
3 Replies

6. UNIX for Dummies Questions & Answers

paste command without spacing?

I'm trying to combine text files without a space. So if i use the paste command paste file1 file2 file3 > file4 the new file created has spacing between the contents of the once individual files. Is there some trick I can do with a delimiter that removes the spaces.. like paste -d'' or... (1 Reply)
Discussion started by: steveinthebox
1 Replies

7. UNIX for Dummies Questions & Answers

Define spacing of columns

Hi! I need to change the spacing assigned to each number in a text file. I have an input file with 5 columns and 3 rows. Here, all numbers are separated by 1 space. I need to change this in such a way that the number in the first column has 6, the number in the second column has 5 and all other... (2 Replies)
Discussion started by: Alauda
2 Replies

8. UNIX for Dummies Questions & Answers

output spacing and formatting

here is my code and output, i just want to display it clearly to the users. how can I fix the spacing or put some headers like NAME, DEV id, Size, Meta code: symdg show $INS-${SNAP} | egrep "D-" | awk '{print $1,$3,$NF,$5}' output: D-arch 23C2 983040 (M) D-db 0704 245760 (M) D-undo 07DB... (12 Replies)
Discussion started by: prodigy06
12 Replies

9. Shell Programming and Scripting

Uniform Spacing in the message

Hello, I am running a script which sends an output as an email; I am having issues with the spacing being not uniform in the message. Snippet of the code and email message below: if ] then echo "$Hostname\tMISSING\tHMCBackup" >> $BackupMsg else if ] then echo... (12 Replies)
Discussion started by: hasn318
12 Replies

10. UNIX for Beginners Questions & Answers

Grep spacing issue

Hi, I'm trying to match html strings using grep commend and I'm not able to eliminate the extra spaces. This is working when there is no space. Can anyone help me what am I missing here? I'm able to match KayDee where there is no space. grep commands tried: grep -P -o -e... (1 Reply)
Discussion started by: Shenbaga.d
1 Replies
labeledwidget(1)						  [incr Widgets]						  labeledwidget(1)

__________________________________________________________________________________________________________________________________________________

NAME
labeledwidget - Create and manipulate a labeled widget SYNOPSIS
labeledwidget pathName ?options? INHERITANCE
itk::Widget <- labeledwidget STANDARD OPTIONS
background cursor foreground See the "options" manual entry for details on the standard options. WIDGET-SPECIFIC OPTIONS Name: disabledForeground Class: DisabledForeground Command-Line Switch: -disabledforeground Specifies the foreground to be used when the state is disabled. Name: labelBitmap Class: Bitmap Command-Line Switch: -labelbitmap Specifies a bitmap to display in the widget, in any of the forms acceptable to Tk_GetBitmap. This option overrides the labeltext option. Name: labelFont Class: Font Command-Line Switch: -labelfont Specifies the font to be used for the label. 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 childsite and label in any of the forms acceptable to Tk_GetPixels. The default is 2 pixel. Name: labelPos Class: Position Command-Line Switch: -labelpos Specifies the position of the label along the side of the childsite: nw, n, ne, sw, s, se, en, e, es, wn, w, or ws. The default is w. 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: state Class: State Command-Line Switch: -state Specifies one of two states for the label: normal or disabled. If the label is disabled then it is displayed in a disabled fore- ground color. The default is normal. __________________________________________________________________________________________________________________________________________________ DESCRIPTION
The labeledwidget command creates a labeled widget which contains a label and child site. The child site is a frame which 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 label widget and a childsite. The options include the ability to position the label around the childsite widget, modify the font and margin, and control the display of the labels. METHODS
The labeledwidget 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 labeledwidget 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 labeled- widget 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 labeledwidget command. STATIC METHODS
Labeledwidget::alignlabels widget ?widget ...? The alignlabels procedure takes a list of widgets derived from the Labeledwidget class and uses the label margin to make each widget have the same total space for the combination of label and margin. The net effect is to left align the labels. Generally, this method is only useful with a label position of w, which is the default. 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. Name: lwchildsite Class: frame The lwchildsite component is the user child site for the labeled widget. See the "frame" widget manual entry for details on the lwchildsite component item. EXAMPLE
The labeledwidget was primarily meant to be a base class. The ScrolledListBox and EntryField are good examples of derived classes of the labeledwidget class. In order to provide equal support for composite classes, the 'childsite' methods also exists. The fol- lowing is an example of 'childsite' method usage. labeledwidget .lw -labeltext "Canvas Widget" -labelpos s pack .lw -fill both -expand yes -padx 10 -pady 10 set cw [canvas [.lw childsite].c -relief raised -width 200 -height 200] pack $cw -padx 10 -pady 10 AUTHOR
Mark L. Ulferts KEYWORDS
labeledwidget, widget Tk labeledwidget(1)
All times are GMT -4. The time now is 04:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy