Sponsored Content
Top Forums Shell Programming and Scripting Disable Enter key to be pressed Post 302477701 by jim mcnamara on Monday 6th of December 2010 08:06:28 AM
Old 12-06-2010
This suggestion is not a great idea but it will work.
In the background code - issue a
Code:
#!/bin/bash
kill -STOP $PPID
..... run your code here
kill -CONT $PPID

 

10 More Discussions You Might Find Interesting

1. Programming

know what key is pressed

hi i´m making a program, and i would like to know how can i know what key was pressed. i'm using Sun5.7 and C. is there a keypress/keypressed function in C? how can i know recognize the keys (enter, tab, shift, etc.)? can i recognize two keys ? (shift+A, ctrl+C, etc) any idea.. thanks (4 Replies)
Discussion started by: DebianJ
4 Replies

2. UNIX for Dummies Questions & Answers

Pressing backspace key simulates enter key

Hi, Whenever i press the backspace key, a new line appears, i.e. it works like a enter key. :confused: Thanks (2 Replies)
Discussion started by: vibhor_agarwali
2 Replies

3. Shell Programming and Scripting

How to identify whether the return key is pressed ??

I want my program(ksh) to execute further only if the return key is pressed. Please help. i have already tried "\n", "\r", "^M" . Thanks in advance (2 Replies)
Discussion started by: AiK
2 Replies

4. UNIX for Dummies Questions & Answers

screen blinks when escape key is pressed

hi folks, i am using sun solaris, when i press escape key in putty/netterm screen will blink for a second, plese let me know where this setting is done by my admin, what i feel is my admin must have set some control key for this so that screen will refresh each time i press escape key. please let... (1 Reply)
Discussion started by: sudheer157
1 Replies

5. Shell Programming and Scripting

enter key solaris

Hi, When I run script on Sun Solaris (sassetup), it prompts to "Press Enter To Continue". Now I want to automate this, ie put sassetup in a script file. So, when I run this file, it should be executed automatically without waiting for anyone to press Enter Key. I have tried the following... (1 Reply)
Discussion started by: sajjunaqvi
1 Replies

6. Shell Programming and Scripting

How to disable Enable/Disable Tab Key

Hi All, I have bash script, so what is sintax script in bash for Enable and Disable Tab Key. Thanks for your help.:( Thanks, Rico (1 Reply)
Discussion started by: carnegiex
1 Replies

7. Shell Programming and Scripting

Wait given time unless key pressed

Hello everyone. I'm trying to create a script that waits a given amount of time unless a given key is pressed. I found a very useful thread here https://www.unix.com/shell-programming-scripting/59605-trap-key-press-script.html however, I cannot figure out a way of avoiding the keypress if the... (2 Replies)
Discussion started by: cue
2 Replies

8. Shell Programming and Scripting

how can i know the pressed key is arrowup?

Hi all, I need to know how to test a pressed key is arrowup or arrowdown and etc.. I found that the "echo" won't print anything if i enter the arrowup in the below code: read echo "you pressed $REPLY" Then i find a way to achieve my goal. 1 #! /bin/bash 2 3 ARROWUP='\;then... (4 Replies)
Discussion started by: homeboy
4 Replies

9. Red Hat

Enter Bios and disable onboard NICS?

Hi, I have to get into BIOS and disable onbaord NICS for an IBM server, can someone please help me out. I tried hitting F1 when reboot to get into BIOS, but it seems like a setup screen and I dont see any option to disable NICS? Thanks Sam (0 Replies)
Discussion started by: sam4919
0 Replies

10. Shell Programming and Scripting

Simulate enter key

I have a popup window that appears on every boot up. I would like to have it dismissed automatically each time instead of having to hit the enter key. I thought I could write a script that would execute on startup. I tried this xdotool key return andy@7_~/Downloads$ xdotool key ... (7 Replies)
Discussion started by: drew77
7 Replies
mmsclient_script(4)						   File Formats 					       mmsclient_script(4)

NAME
mmsclient_script - script file for mmsclient program SYNOPSIS
mmsclient_script DESCRIPTION
This man page describes the syntax of the script file that is driven by the mmsclient(1M) utility. This file contains a list of Media Man- agement Protocol (MMP) commands that are used to communicate with a Media Management server. The MMP and the commands in the script file are based, in part, on IEEE 1244, the Media Management System (MMS) standards. In the script file, each MMP command must start with one of the following symbols as the first character: # Comment character Indicates the following characters document the file or command. Any character following the # character on the same line is ignored. @ Async command Indicates that the command on the next line is sent in async mode. Any character following the @ character on the same line is ignored. The MMP command to be performed must start on the next line. Commands that are not preceded with the @ character are sent in sync mode, that is, the mmsclient command waits for a response before continuing to the next MMP command in the file. $ Sync point Forces the mmsclient command to wait for a response to a previous async command. For example, if the script contained an async com- mand such as: @task["Get volume Names"] ...a subsequent command: $Get volume Names ...stops the script until the volume names are retrieved. > Interactive MMP prompt Displays a prompt on the display device and pauses the script. To respond to the prompt, type the requested information, ending with the semicolon (;) character. The mmsclient utility then sends the information to the MMS server. To skip the MMP prompt, type the q character. % Pause the script The script stops until you press the Enter key. ! Execute a command The mmsclient utility issues a call to system(3C) to invoke a command. Whatever command follows ! is run in the shell in which mmsclient is run. For example: ! date See the shell commands in the example script below. EXAMPLES
Example 1 Example Script The following script, demo_example, demonstrates the special characters and some MMP commands. It is executed with default values when the command: # mmsclient -f demo _example ...is run. #mmsclient example script #Send show commands in sync mode show task["sync show command 1"] report[DM] reportmode[namevalue] number[1..2]; show task["sync show command 2"] report[LM LIBRARY] reportmode[namevalue] number[1..2]; #Pause the script and wait for someone to #press Enter to continue % #send show commands in async mode @ show task["async show command 1"] report[DRIVE] reportmode[namevalue] number[1..2]; @ show task["async show command 2"] report[CARTRIDGE VOLUME] reportmode[namevalue] number[1..2]; #set a sync point for the second async command, #to stop the script until the response is complete $async show command 2 #set a sync point for an unsent command and set #a sync pont for a command that has already received a response. #mmsclient does not stop for either one $sync show command 1 #Start interactive MMP prompt. #To continue, enter an MMP command or 'q' > #Register for a some events notify task["notify test3"] receive[tag["client connected"] object[CONNECTION] action["add"] match[streq(CONNECTION."Language" "MMP")]] receive[tag["client disconnected"] object[CONNECTION] action["delete"] match[streq(CONNECTION."Language" "MMP")]] receive[tag["DM connected"] object[CONNECTION] action["add"] match[streq(CONNECTION."Language" "DMP")]] receive[tag["DM disconnected"] object[CONNECTION] action["delete"] match[streq(CONNECTION."Language" "DMP")]] receive[tag["LM connected"] object[CONNECTION] action["add"] match[streq(CONNECTION."Language" "LMP")]] receive[tag["LM disconnected"] object[CONNECTION] action["delete"] match[streq(CONNECTION."Language" "LMP")]] ; #Pause the script #Connect another mmsclient to see some events #Press Enter key to continue % notify task["delete all CONNECTION events"] cancel[object[CONNECTION]]; #Pause the script and wait. #Connect another mmsclient to verify the events are cancelled. #Press Enter key to continue % #Execute some simple shell commands !echo Hello World !uname -a !hostname #Pause the script and wait. #Press Enter key to continue % #Send last command in async mode. #mmsclient does not exit until it receives the responses #for all pending commmands. @ show task["async show command 3"] report[APPLICATION] reportmode[namevalue]; @ show task["async show command 4"] report[AI] reportmode[namevalue]; ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWmmsu | +-----------------------------+-----------------------------+ |Interface Stability |Volatile | +-----------------------------+-----------------------------+ SEE ALSO
mmsadm(1M), mmsclient(1M), mmsexplorer(1M), mmsinit(1M), system(3C), attributes(5) IEEE 1244, IEEE Storage Systems Standards, a set of MMS standards SunOS 5.11 10 Jul 2008 mmsclient_script(4)
All times are GMT -4. The time now is 09:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy