Sponsored Content
Top Forums Shell Programming and Scripting How to enter a return key in bash script? Post 302424902 by duker61 on Wednesday 26th of May 2010 02:02:50 PM
Old 05-26-2010
Quote:
Originally Posted by curleb
can you modify the install script to allow for an interrupt? Like:
Code:
more docs/env.txt 2>/dev/null

The script is a vendor script. I'm trying to avoid modifying it.

One of my friends here told me to change the script to use cat instead of more. So this line:

more docs/env.txt

changed to:

cat docs/env.txt

Seems to work.

It's displaying a supported environment list that I really don't need in a scripted install but I really want to not have to remember to change the install script every time I get a new version.
 

10 More Discussions You Might Find Interesting

1. 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

2. UNIX for Advanced & Expert Users

using enter key in shell script

without pressing the enter key ..manually... how can we read the enter key ..from the shell script..so that the script termintes automatically. eg: telnet a.b.c.d xxxx now " how to read the enter key" tho terminate the script (1 Reply)
Discussion started by: bishweshwar
1 Replies

3. Shell Programming and Scripting

writing Enter key inside in shell script

for automating telnet using shell script..... as we enter alphabetic characters inside shell script...how can we do the same for the enter key......Is there any character for the enter key so the enter key need not be pressed manually...... (3 Replies)
Discussion started by: bishweshwar
3 Replies

4. Shell Programming and Scripting

How to catch ENTER key inside the shell script?

Hi, I have a script in which i have to ask user to press the ENTER key to proceed further. can you please help me how can i achive this in my scripting? echo "All the executables builded Successfully " echo " Press Enter to Go Back to the Main Menu" ... (2 Replies)
Discussion started by: plaban.rout
2 Replies

5. Shell Programming and Scripting

BASH: Any Way to Get User Input Without Requiring Them to Hit the Enter Key?

I'm working on making a menu system on an HP-UX box with Bash on it. The old menu system presents the users with a standard text menu with numbers to make selections. I'm re-working the system and I would like to provide something more akin to iterative search in Emacs. I have a list of 28... (2 Replies)
Discussion started by: deckard
2 Replies

6. Shell Programming and Scripting

Simulating enter key via shell script

How to simulate enter key via shell script (2 Replies)
Discussion started by: proactiveaditya
2 Replies

7. Shell Programming and Scripting

enter key or carriage return as input in perl

hi experts Question in perl i'm creating a script to take from user a different inputs one of them is the carriage return .. so that i want to make an if condition if the user hit enter key the user will go to previous step it something like that chomp ($input = <STDIN>); if ($input =~... (3 Replies)
Discussion started by: doubando
3 Replies

8. Shell Programming and Scripting

How to pass enter key or selected character in bash script?

hi, i've bash script thats working... but now i need to add a line....that prompts for user input....like yes and 1 as complete install.... so here's how it looks... $ cd 9200 (cd into directory) $./install (hv to type ./install to run install then ask for) ----do you want to... (4 Replies)
Discussion started by: kernel11
4 Replies

9. Shell Programming and Scripting

Input password to bash script, save, and enter when needed

I am looking for a way to start a script and have it prompt for a password that will be used later on in the script to SSH to another host and to SFTP. I don't want the password to be hard coded. Below is my script with the actual IP's and usernames removed. #!/usr/bin/expect -f... (2 Replies)
Discussion started by: jbrass
2 Replies

10. Shell Programming and Scripting

Script termination without pressing Enter key[nohup]

I have a script in which we have used nohup. Once script is executed it will be terminated only when enter key is pressed. I want the script to be terminated without pressing enter key nohup imqbrokerd -name user_id port 2>1 1>$home_`date` & I am a newbie to shell, Kindly please help (3 Replies)
Discussion started by: Suganbabu
3 Replies
TP-MAGIC-CONFIG(1)						  tp-magic-config						TP-MAGIC-CONFIG(1)

NAME
tp-magic-config -- Helps creating 'Magic' tool plugins for Tux Paint(1) SYNOPSYS
tp-magic-config [--apiversion | --version | --cflags | --pluginprefix | --plugindocprefix | --dataprefix | --localpluginprefix | --local- dataprefix] DESCRIPTION
tp-magic-config is a simple shell script that responds with various pieces of information about the currently-installed version of Tux Paint(1) that are useful when building 'Magic' tool plugins. OPTIONS
--apiversion Outputs the version of the Tux Paint 'Magic' tool plugin API that the installed copy of Tux Paint supports. (For API compatibility testing.) --version Outputs the version of Tux Paint that tp-magic-config corresponds to. --cflags Outputs the compiler flags that Tux Paint 'Magic' tool plugins should be compiled with. (For example, a "-I" include path option that tells the compiler where it can find the plugin API header file, "tp_magic_config.h", that plugins must #include.) --pluginprefix Outputs the system directory where the installed copy of Tux Paint expects to find 'Magic' tool plugins (".so" shared objects). (e.g., "/usr/share/tuxpaint/plugins") --localpluginprefix Outputs the user directory where the installed copy of Tux Paint expects to find 'Magic' tool plugins (".so" shared objects). (e.g., "/home/username/.tuxpaint/plugins") --plugindocprefix Outputs the directory where the installed copy of Tux Paint expects to find documentation for 'Magic' tool plugins (".html" and ".txt" files). Tux Paint's main documentation includes a link to this directory under the section on "Magic" tools. --dataprefix Outputs the system directory where the installed copy of Tux Paint keeps its global data files (e.g., "/usr/share/tuxpaint/"). This is the same value that plugins installed system-wide will receive in the "data_directory" string within the "magic_api" structure sent to the plugins' functions. --localdataprefix Outputs the user directory where the installed copy of Tux Paint expects plugins to install their local data files. (e.g., "/home/username/.tuxpaint/plugins/data"). This is the same value that plugins installed locally will receive in the "data_direc- tory" string within the "magic_api" structure sent to the plugins' functions. SYSTEM-WIDE SHELL EXAMPLES $ gcc -shared `tp-magic-config --cflags` my_plugin.c -o my_plugin.so # cp my_plugin.so `tp-magic-config --pluginprefix` # cp my_plugin_icon.png `tp-magic-config --dataprefix`/images/magic # cp my_plugin.html `tp-magic-config --plugindocrefix`/html # cp my_plugin.txt `tp-magic-config --plugindocrefix` LOCAL SHELL EXAMPLES
$ gcc -shared `tp-magic-config --cflags` my_plugin.c -o my_plugin.so $ mkdir -p `tp-magic-config --localpluginprefix` $ cp my_plugin.so `tp-magic-config --localpluginprefix` $ mkdir -p `tp-magic-config --localdataprefix`/images/magic $ cp my_plugin_icon.png `tp-magic-config --localdataprefix`/images/magic SYSTEM-WIDE MAKEFILE EXAMPLE MAGIC_CFLAGS=$(shell tp-magic-config --cflags) MAGIC_PREFIX=$(shell tp-magic-config --pluginprefix) MAGIC_DOC_PREFIX=$(shell tp-magic-config --plugindocprefix) DATA_PREFIX=$(shell tp-magic-config --dataprefix) all: my_plugin.so my_plugin.so: my_plugin.c install: install-so install-data install-docs install-so: mkdir -p $(MAGIC_PREFIX) cp my_plugin.so $(MAGIC_PREFIX)/ chmod 644 $(MAGIC_PREFIX)/my_plugin.so install-data: mkdir -p $(DATA_PREFIX) cp icons/my_plugin_icon.png $(DATA_PREFIX)/images/magic/ chmod 644 $(DATA_PREFIX)/images/magic/my_plugin_icon.png install-docs: mkdir -p $(MAGIC_DOC_PREFIX) cp docs/my_plugin.html $(MAGIC_DOC_PREFIX)/html/ chmod 644 $(MAGIC_DOC_PREFIX)/html/my_plugin.html cp docs/my_plugin.txt $(MAGIC_DOC_PREFIX)/ chmod 644 $(MAGIC_DOC_PREFIX)/my_plugin.txt AUTHOR
Bill Kendrick. <bill@newbreedsoftware.com> SEE ALSO
tuxpaint(1), And documentation within /usr/[local/]share/doc/tuxpaint/. 2007.08.07 07 August 2007 TP-MAGIC-CONFIG(1)
All times are GMT -4. The time now is 04:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy