Sponsored Content
Top Forums Shell Programming and Scripting Display echo results in three column Post 302395437 by Franklin52 on Tuesday 16th of February 2010 05:29:55 AM
Old 02-16-2010
Assuming you want to combine line 1 with 51 and 101, line 2 with 52 and 102 and so forth:

Code:
awk '{a[NR%50]=a[NR%50]?a[NR%50] FS $0: $0}
END{for(i=1;i<50;i++){print a[i]};print a[0]}
' components

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Display from a variable using echo.

I have a variable that is outputting a lot of space. here has been 45 lines returned ... how can I remove the spaces between the "been and the 45" CODE: fil_len=`wc -l < coshb.txt` if ; then cat coshb.txt | more echo " " echo "There has been ${fil_len} lines... (4 Replies)
Discussion started by: jagannatha
4 Replies

2. Solaris

Top and Prstat display different results for memory

I have a question about the accuracy of prstat. I did a 'prstat -t' and it shows 99% of my memory is occupied by oracle. NPROC USERNAME SIZE RSS MEMORY TIME CPU 194 oracle 343G 340G 99% 86:17.24 56% However, 'top' shows I still have 7762meg of memory free. Memory: 16G real, 7762M... (4 Replies)
Discussion started by: zen03
4 Replies

3. Shell Programming and Scripting

what does echo $$ command display

whats the value stored in $$ (2 Replies)
Discussion started by: suri
2 Replies

4. UNIX for Dummies Questions & Answers

How to display first 7 char of grep results?

My file contains the following: uat2000.aspclient.active=true uat2001.aspclient.active=true uat2002.aspclient.active=true uat2003.aspclient.active=true uat2004.aspclient.active=false uat2005.aspclient.active=false uat2006.aspclient.active=false uat2007.aspclient.active=false... (8 Replies)
Discussion started by: kthatch
8 Replies

5. Shell Programming and Scripting

echo display problem

Hi I am facing a strange problem a=03 echo ${a} the output is 3 But i want to display it is 03 Can you people help me how to display it like 03. Thanks (2 Replies)
Discussion started by: aishsimplesweet
2 Replies

6. Shell Programming and Scripting

Display find results, and pipe to xargs

I have an overnight script which runs across a large directory to repair permissions and ownership. I also have this command output the list of files affected so that cron can email these as a log file. Previously I had the command in the form: find /path/to/files -not -user myname -print -exec... (4 Replies)
Discussion started by: mij
4 Replies

7. Homework & Coursework Questions

Using ls or echo to display a specific output

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: What single command line would you enter to get the following output? 8140 drwxr-xr-x 9 root bin 18 Jan 20... (6 Replies)
Discussion started by: dasboot
6 Replies

8. UNIX and Linux Applications

Display mysql results nicely

Hi, perhaps this is a dumb question. I'm running queries on mysql and I'm getting tabbed results like these: mysql> SELECT * from metrics_status WHERE date = '2012-03-30'; <TABLE... (1 Reply)
Discussion started by: erick_tuk
1 Replies

9. Shell Programming and Scripting

display echo only once

lets say I am printing something out echo "Please enter a valid username" and its being printed out 5 times, is there any way I can limit to only being displayed ONCE. I tried echo -n but that just makes everything fit on one line. Right now it keeps saying Please enter a valid... (5 Replies)
Discussion started by: subway69
5 Replies

10. Shell Programming and Scripting

how to display some special results with AWK

I have a file like this: AAEQGAGNQPQH,,,,160,32,,,, AAGQDYNSPLH,,712,39,,,,,, AAGREGGNTEAF,26,,,,,,,,4 AAGSPQH,,,,8,5,,,, AAKKLGQFYNEQF,4,,6,,,7,,,2 AANSGGRYNEQF,,2747,3120,,,,,, AAQGGVGGELF,,,,5,,12,36,, AAQGLAGYYEQY,,25,13,,,,,, AAQRGNEQF,510,2,,,6,,6,,76 AAQTGENSPLH,,16,16,,,,,, The... (9 Replies)
Discussion started by: xshang
9 Replies
ttk::scrollbar(n)						 Tk Themed Widget						 ttk::scrollbar(n)

__________________________________________________________________________________________________________________________________________________

NAME
ttk::scrollbar - Control the viewport of a scrollable widget SYNOPSIS
ttk::scrollbar pathName ?options...? _________________________________________________________________ DESCRIPTION
ttk::scrollbar widgets are typically linked to an associated window that displays a document of some sort, such as a file being edited or a drawing. A scrollbar displays a thumb in the middle portion of the scrollbar, whose position and size provides information about the por- tion of the document visible in the associated window. The thumb may be dragged by the user to control the visible region. Depending on the theme, two or more arrow buttons may also be present; these are used to scroll the visible region in discrete units. STANDARD OPTIONS
-class -cursor -style -takefocus See the ttk_widget manual entry for details on the standard options. WIDGET-SPECIFIC OPTIONS [-command command] A Tcl script prefix to evaluate to change the view in the widget associated with the scrollbar. Additional arguments are appended to the value of this option, as described in SCROLLING COMMANDS below, whenever the user requests a view change by manipulat- ing the scrollbar. This option typically consists of a two-element list, containing the name of a scrollable widget followed by either xview (for hori- zontal scrollbars) or yview (for vertical scrollbars). [-orient orient] One of horizontal or vertical. Specifies the orientation of the scrollbar. WIDGET COMMAND
pathName cget option Returns the current value of the specified option; see ttk::widget(n). pathName configure ?option? ?value option value ...? Modify or query widget options; see ttk::widget(n). pathName get Returns the scrollbar settings in the form of a list whose elements are the arguments to the most recent set widget command. pathName identify x y Returns the name of the element at position x, y. See ttk::widget(n). pathName instate statespec ?script? Test the widget state; see ttk::widget(n). pathName set first last This command is normally invoked by the scrollbar's associated widget from an -xscrollcommand or -yscrollcommand callback. Speci- fies the visible range to be displayed. first and last are real fractions between 0 and 1. pathName state ?stateSpec? Modify or query the widget state; see ttk::widget(n). INTERNAL COMMANDS
The following widget commands are used internally by the TScrollbar widget class bindings. pathName delta deltaX deltaY Returns a real number indicating the fractional change in the scrollbar setting that corresponds to a given change in thumb posi- tion. For example, if the scrollbar is horizontal, the result indicates how much the scrollbar setting must change to move the thumb deltaX pixels to the right (deltaY is ignored in this case). If the scrollbar is vertical, the result indicates how much the scrollbar setting must change to move the thumb deltaY pixels down. The arguments and the result may be zero or negative. pathName fraction x y Returns a real number between 0 and 1 indicating where the point given by x and y lies in the trough area of the scrollbar, where 0.0 corresponds to the top or left of the trough and 1.0 corresponds to the bottom or right. X and y are pixel coordinates relative to the scrollbar widget. If x and y refer to a point outside the trough, the closest point in the trough is used. SCROLLING COMMANDS
When the user interacts with the scrollbar, for example by dragging the thumb, the scrollbar notifies the associated widget that it must change its view. The scrollbar makes the notification by evaluating a Tcl command generated from the scrollbar's -command option. The command may take any of the following forms. In each case, prefix is the contents of the -command option, which usually has a form like .t yview prefix moveto fraction Fraction is a real number between 0 and 1. The widget should adjust its view so that the point given by fraction appears at the beginning of the widget. If fraction is 0 it refers to the beginning of the document. 1.0 refers to the end of the document, 0.333 refers to a point one-third of the way through the document, and so on. prefix scroll number units The widget should adjust its view by number units. The units are defined in whatever way makes sense for the widget, such as char- acters or lines in a text widget. Number is either 1, which means one unit should scroll off the top or left of the window, or -1, which means that one unit should scroll off the bottom or right of the window. prefix scroll number pages The widget should adjust its view by number pages. It is up to the widget to define the meaning of a page; typically it is slightly less than what fits in the window, so that there is a slight overlap between the old and new views. Number is either 1, which means the next page should become visible, or -1, which means that the previous page should become visible. WIDGET STATES
The scrollbar automatically sets the disabled state bit. when the entire range is visible (range is 0.0 to 1.0), and clears it otherwise. It also sets the active and pressed state flags of individual elements, based on the position and state of the mouse pointer. EXAMPLE
set f [frame .f] ttk::scrollbar $f.hsb -orient horizontal -command [list $f.t xview] ttk::scrollbar $f.vsb -orient vertical -command [list $f.t yview] text $f.t -xscrollcommand [list $f.hsb set] -yscrollcommand [list $f.vsb set] grid $f.t -row 0 -column 0 -sticky nsew grid $f.vsb -row 0 -column 1 -sticky nsew grid $f.hsb -row 1 -column 0 -sticky nsew grid columnconfigure $f 0 -weight 1 grid rowconfigure $f 0 -weight 1 SEE ALSO
ttk::widget(n), scrollbar(n) KEYWORDS
scrollbar, widget Tk 8.5 ttk::scrollbar(n)
All times are GMT -4. The time now is 11:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy