Sponsored Content
Top Forums Shell Programming and Scripting Method to display a line at the top always, regardless of stdout Post 302613339 by complex.invoke on Tuesday 27th of March 2012 05:44:43 AM
Old 03-27-2012
Code:
echo -e "\e[1;1H ...... Internal audit script ......"
tar xvf hugefile.tar

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How Can I Have Top Display The Top 20 Processes??

how can i do that in a script withough havin the script halt at the section where the top command is located. am writign a script that will send me the out put of unx commands if the load average of a machine goes beyond the recommended number. top -n 20 i want to save this output to a file... (1 Reply)
Discussion started by: TRUEST
1 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. UNIX for Dummies Questions & Answers

redirect stderr and/or stdout to /dev/null from command line

Is it possible to redirect errors at the command line when you run the script such as bash scriptname & 2>/dev/null? (1 Reply)
Discussion started by: knc9233
1 Replies

4. Shell Programming and Scripting

Display most top 10 occurring words along with number of ocurences of word inthe text

I need Display the most top 10 occurring words along with the number of occurences of those words in the given text. Sample text as below: "The Travails of Single South Indian men of conservative upbringing" or "Why we don't get any..." Yet another action packed weekend in Mumbai, full of... (2 Replies)
Discussion started by: smacherla
2 Replies

5. Shell Programming and Scripting

Shell script to display top 5 process (per cpu consumption)

Hello, I have to create shell script being myself real novice in scripting... I was looking on the Internet for some script examples, but I don't have the basic understanding of the shell. I was trying to do something with “ps” command without success. For exemple total number of... (2 Replies)
Discussion started by: mr_awd
2 Replies

6. Shell Programming and Scripting

Display top ten directories by size

Hi, I am new to Unix. I want to display top 10 folders by size. I tried with du -ksl * | sort -nr | head -10 command .But I am getting the following error -bash: /usr/bin/du: Argument list too long Can some one help me. Thanks. (5 Replies)
Discussion started by: Satyak
5 Replies

7. UNIX for Dummies Questions & Answers

replace stdout line in loop

Hi, as part of a script i have a loop that goes though a set of files. This loop can take some time, so i'd like to show the user that something is happening by showing them the filename being worked on. I could create a long list of file names in the terminal using echo or print... (0 Replies)
Discussion started by: nickrick
0 Replies

8. Shell Programming and Scripting

STDOUT in one line

Hi all, I got a file which contains this. aaaaaaaaaaaaaaaaaaaaaaaa test aaaaaaaaaaaaaa test aaaaaaaaaaa test aaaaaaaaaaaaaaaaa test aaaaaaaaaaaaaaaaaaaaa test aaaaaaaaa test aaaaa test and I want all test output in one row, ideally 3 spaces after the longest word. Thanks (4 Replies)
Discussion started by: stinkefisch
4 Replies

9. UNIX for Dummies Questions & Answers

Display Directory path on top

Hello, I am using below in my .bashrc to dynamically display user/host/directory information whenever i logged in to my Red hat Linux 64bit OS, BASH shell. export PS1='$PWD>' output: /dbms/app/oracle/product/11.2.0/dbhome_1> But i want to display absolute path information to be displayed... (1 Reply)
Discussion started by: Ariean
1 Replies

10. UNIX for Beginners Questions & Answers

How to display only the first 5 running process using top in shell scripting?

topfunc() { top } topfunc Here i used the top command inside a function,and i called the function. when executing this bash file i get all the process which are using by the kernel i just want to display only the first 5 running process. is it possible? (7 Replies)
Discussion started by: Meeran Rizvi
7 Replies
XMESSAGE(1)						      General Commands Manual						       XMESSAGE(1)

NAME
xmessage - display a message or query in a window (X-based /bin/echo) SYNOPSIS
xmessage [ -buttons label1[:value1],label2[:value2], ... ] [ options ] -file filename xmessage [ -buttons label1[:value1],label2[:value2], ... ] [ options ] message ... DESCRIPTION
The xmessage program displays a window containing a message from the command line, a file, or standard input. Along the lower edge of the message is row of buttons; clicking the left mouse button on any of these buttons will cause xmessage to exit. Which button was pressed is returned in the exit status and, optionally, by writing the label of the button to standard output. The program is typically used by shell scripts to display information to the user or to ask the user to make a choice. Unless a size is specified, xmessage sizes itself to fit the message, up to a maximum size. If the message is too big for the window, xmessage will display scroll bars. OPTIONS
These are the command line options that xmessage understands. -buttons button,button,... This option will cause xmessage to create one button for each comma-separated button argument. The corresponding resource is but- tons. Each button consists of a label optionally followed by a colon and an exit value. The label is the name of the Command but- ton widget created and will be the default text displayed to the user. Since this is the name of the widget it may be used to change any of the resources associated with that button. The exit value will be returned by xmessage if that button is selected. The default exit value is 100 plus the button number. Buttons are numbered from the left starting with one. The default string if no -buttons option is given is okay:0. -default label Defines the button with a matching label to be the default. If not specified there is no default. The corresponding resource is defaultButton. Pressing Return anywhere in the xmessage window will activate the default button. The default button has a wider border than the others. -file filename File to display. The corresponding resource is file. A filename of `-' reads from standard input. If this option is not sup- plied, xmessage will display all non-option arguments in the style of echo. Either -file or a message on the command line should be provided, but not both. -print This will cause the program to write the label of the button pressed to standard output. Equivalent to setting the printValue resource to TRUE. This is one way to get feedback as to which button was pressed. -center Pop up the window at the center of the screen. Equivalent to setting the center resource to TRUE. -nearmouse Pop up the window near the mouse cursor. Equivalent to setting the nearMouse resource to TRUE. -timeout secs Exit with status 0 after secs seconds if the user has not clicked on a button yet. The corresponding resource is timeout. WIDGET HIERARCHY
Knowing the name and position in the hierarchy of each widget is useful when specifying resources for them. In the following chart, the class and name of each widget is given. Xmessage (xmessage) Form form Text message Command (label1) Command (label2) . . . RESOURCES
The program has a few top-level application resources that allow customizations that are specific to xmessage. file A String specifying the file to display. buttons A String specifying the buttons to display. See the -buttons command-line option. defaultButton A String specifying a default button by label. printValue A Boolean value specifying whether the label of the button pressed to exit the program is written to standard output. The default is FALSE. center A Boolean value specifying whether to pop up the window at the center of the screen. The default is FALSE. nearMouse A Boolean value specifying whether to pop up the window near the mouse cursor. The default is FALSE. timeout The number of seconds after which to exit with status 0. The default is 0, which means never time out. maxHeight (class Maximum) The maximum height of the text part of the window in pixels, used if no size was specified in the geometry. The default is 0, which means use 70% of the height of the screen. maxWidth (class Maximum) The maximum width of the text part of the window in pixels, used if no size was specified in the geometry. The default is 0, which means use 70% of the width of the screen. ACTIONS
exit(value) exit immediately with an exit status of value (default 0). This action can be used with translations to provide alternate ways of exiting xmessage. default-exit() exit immediately with the exit status specified by the default button. If there is no default button, this action has no effect. EXIT STATUS
If it detects an error, xmessage returns 1, so this value should not be used with a button. SEE ALSO
X(7), echo(1), cat(1) AUTHORS
Chris Peterson, MIT Project Athena Stephen Gildea, X Consortium X Version 11 xmessage 1.0.3 XMESSAGE(1)
All times are GMT -4. The time now is 02:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy