Sponsored Content
Top Forums Shell Programming and Scripting Repeat a command on linux without typing Post 302659913 by jacobs.smith on Thursday 21st of June 2012 03:02:48 PM
Old 06-21-2012
Quote:
Originally Posted by jim mcnamara
What are you trying to accomplish? If you make the return key do anything "interesting" like this it will break things. Lots of things. So, what do you want to do - not how you think it should be done....
I am trying to work on some text files. I am looking into their heads and after looking at 10 files heads, I would like to clear the screen on my linux terminal.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Repeat a command in a shell

Hi there, i would like to repeat a command in a shell sript (bash) the script starts with a menu to choose a menu point to do something .... on the end of the script i would like to restart the programm to choose the menu points on the beginning. I would also make a sript that send... (2 Replies)
Discussion started by: scotty
2 Replies

2. Shell Programming and Scripting

Different in typing command and using shell script

Wondering why belows code works fine if i type in the command prompt but it seems not executed when i code them in a file with additional if-then-else statement. #!/bin/sh . $HOME/.profile pid=`ps -ef | grep -w XELstnr | grep -v grep | awk {'print $2'}` if then echo "Stopping... (2 Replies)
Discussion started by: Draculla
2 Replies

3. UNIX for Dummies Questions & Answers

Using the Esc key to complete command line typing

Dear Techs, In the past on a different box (HP) I use to be able to complete something I was typing by entering a portion of the filename in the pwd and I would hit the Esc key and it would match the rest of the filename. I did this without understanding how it was setup. Now I am on a new... (1 Reply)
Discussion started by: jxh461
1 Replies

4. Shell Programming and Scripting

Repeat last entered command ?

Hi, how to do that ? I mean only print it but not execute. I'm using putty to interact with ksh. (in windows cmd up arrow does the job) thanks vilius (5 Replies)
Discussion started by: vilius
5 Replies

5. UNIX for Dummies Questions & Answers

Completing Command Entry without Typing

Hi, In my UNIX (KSH) sytem, in order to Complete Command Entry without Typing the whole path or name, I have to use ESC+\ where as I am used to press TAB key to do the same. Can anyone tell me where we need to change the settings of the keyboard combination so that when I press TAB key the file... (6 Replies)
Discussion started by: jisha
6 Replies

6. UNIX for Advanced & Expert Users

Repeat output of last command w/o repeating last command

Is there a way to repeat the output of the last command for filtering without running the command again? All I could think of was to copy all the data to a text file and process it that way, is there another way? Like say I want to grep server.server.lan from a dtrace that was pages long after I... (5 Replies)
Discussion started by: glev2005
5 Replies

7. Red Hat

fsck repeat error in linux kernel 2.6

Hi, When I boot the linux kernel 2.6 , I was kicked out and request to run fsck manually. After running fsck -y /dev/vg00/lvol3 and /dev/vg00/lvol4 and reboot, I still get the same error and request me to run fsck . I attach the console output in here . Please advice to fix it .... (0 Replies)
Discussion started by: chuikingman
0 Replies

8. Shell Programming and Scripting

Repeat a command for one sec

How to repeat the execution of a simple command like the following for 1 sec ? echo Hi The completion time for the command is not known, but we need to calculate the number of times this commans executes successfully within 1 sec. Thanks Kumarjit (5 Replies)
Discussion started by: kumarjt
5 Replies

9. Programming

Java: Repeat a command

I came across a site to learn java and they give you practice problems to do. I was wondering if anyone can help me with this since I am totally new to Java. Here is the first problem: Write a program that will read in a name from the command line and write it out 100 times. Thank you for any... (10 Replies)
Discussion started by: totoro125
10 Replies

10. UNIX for Dummies Questions & Answers

How to Repeat history command?

Assume i have typed 4 commands in the past like vi `ls -t |head -n 1` tail -2 test.txt ls -lrt | grep "/etc/profile.d" pwd Now if i type r p it should execute the command "pwd" likewise r t should execute tail -2 test.txt. Note: esc k and using up arrow and down arrow will get this work... (3 Replies)
Discussion started by: Ramanareddygv
3 Replies
Button(3I)						    InterViews Reference Manual 						Button(3I)

NAME
ButtonState, Button, TextButton, PushButton, RadioButton, CheckBox - interactive buttons SYNOPSIS
#include <InterViews/button.h> DESCRIPTION
Button is a class of interactors that can set the value of a piece of state. ButtonState is a class of objects that contain a value and a list of buttons that can set its value. A value is either an integer or an arbitrary pointer. TextButton is a subclass of Button that has an associated text label to be displayed inside or to the right of the button. PushButton, RadioButton, and CheckBox are subclasses of TextButton that provide particular displays for buttons. Each kind of button will display itself differently for each of the five possible cases: ``enabled'', when the button is listening to input, ``disabled'', when the button is not listening, ``chosen'', when the button's value is equal to its button state's value, ``hit'', when a button that is not chosen first receives a DownEvent, and ``same-hit'', when a button that is chosen receives a DownEvent. When a button receives a DownEvent, it calls the virtual Refresh() to update its display. It then reads input waiting for an UpEvent. If the UpEvent coordinates are also within the button, then it calls the virtual Press(). The default Press operation sets the associated state's value to the button's value. A button can have a list of attached buttons. When a button is not chosen its attached buttons are ``disabled'', meaning they ignore all input events. BUTTONSTATE OPERATIONS
ButtonState() ButtonState(int) ButtonState(void*) Define a button state optionally with an initial value. void Attach(Button*) Add a button to the list associated with a button state. The button will be notified when the button state's value is modified. void Detach(Button*) Remove a button from the list associated with a button state. void GetValue(int&) void GetValue(void*&) Get the value of a button. void SetValue(int) void SetValue(void*) Set the value of a button state and notify all the buttons associated with the state. void operator=(ButtonState&) Copy the value of one button state to another. The button list associated with the source button state is not copied. BUTTON OPERATIONS
void PushButton(const char* text, ButtonState* s, int v) void PushButton(const char* text, ButtonState* s, void* v) Construct a button with text in the center and a polygon on the outside. The polygon is like a rectangle, but with rounded corners. When chosen, the entire button is drawn with foreground and background colors reversed. void RadioButton(const char* text, ButtonState* s, int v) void RadioButton(const char* text, ButtonState* s, void* v) Construct a button with a circle on the left and text on the right. When hit, a second circle is drawn inside the first. When cho- sen, a filled circle is drawn inside the outer circle. void CheckBox(const char* text, ButtonState* s, int on, int off) void CheckBox(const char* text, ButtonState* s, void* on, void* off) Construct a button with a rectangle on the left and text on the right. When hit, a second rectangle is drawn inside the first. When chosen, two diagonal lines are drawn connecting the opposite corners of the rectangle. When a checkbox is pressed the first time, it sets s to off if the value is on and sets s to on otherwise. Subsequent presses swap the values of the checkbox and s. void Attach(Button*) Add to this button's list of associated buttons. These buttons are enabled when the button is chosen and disabled when it is not chosen. void Detach(Button*) Remove a button from this button's list of associated buttons. void Disable() Stop listening to input events. Disabled buttons are typically ``grayed out'' by drawing a half-filled rectangle in the background. void Enable() Start listening to input events. void Choose() Make the button as chosen, enabling any associated buttons. void Handle(Event&) If the event type is DownEvent and the button is enabled, call Refresh and read events until an UpEvent occurs. If the button is the target of the UpEvent, then call Press. virtual void Press() Take the appropriate action for the button being pressed. The default is to set the associated state to the button's value, which will trigger all related buttons to update their display. virtual void Refresh() Update the button display. void SetDimensions(int width, int height) Specify the natural size of the button. The default size is a function of the size of the text. This routine is obsolete; use Interactor::Reshape instead. void UnChoose() Mark the button as not chosen, disabling any associated buttons. SEE ALSO
Event(3I), Interactor(3I) InterViews 15 June 1987 Button(3I)
All times are GMT -4. The time now is 07:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy