08-02-2013
Feed Input to a script running on bash
Hi Sir,
I am just learning bash scripting and I came across a challenge.
I need to input F11 to a script among many text inputs.
For all the text inputs i did following.
# sh test.sh < input.txt
where input.txt contains all the text inputs in new lines.
This worked fine until i came across a input which is F11 or Escape.
Please guide me how to handle this.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have wasted one working day writing this scripts.
It compares two folders and make a good tabbed report about their differences.
#!/bin/bash
function DRAW_DEPTH () {
ROUND=$1
while
do
printf %s " "
ROUND=`expr $ROUND - 1`
done
printf %s "|- "
}
function MAIN () {... (9 Replies)
Discussion started by: trutoman
9 Replies
2. Shell Programming and Scripting
Sorry Guys for not being able to explain in one of my earlier post.
I am now putting my requirement with the input file and desired output file.
In the below input file -
Transaction code is at position 31:40.
Business code is from position 318:321
TSCM00000005837 ... (7 Replies)
Discussion started by: varunrbs
7 Replies
3. Shell Programming and Scripting
Hi,
I have this script
Script.sh:
#!/bin/sh
sed 's,\,,g' input.dat > output .dat
But i want to run it witb different files. So i want the input file as an input argument to the script, how could i do that.
Running it like this:
> Script.sh input.dat (2 Replies)
Discussion started by: Johanni
2 Replies
4. Shell Programming and Scripting
execute the attached script as,
bash -x INFA_MAP_GEN_XML.sh "/export/home/e120945/INFORMATICA_MAPPING_GENERATOR/SOURCE" "INFA_TEMPLATE.csv" "/export/home/e120945/INFORMATICA_MAPPING_GENERATOR/TARGET" "UNIX" "/export/home/e120945/INFORMATICA_MAPPING_GENERATOR/SETUP"... (5 Replies)
Discussion started by: 120945
5 Replies
5. Shell Programming and Scripting
I would create a bash script than parse like this:
test.sh -p (protocol) -i (address) -d (directory)
I need retrive the value after -p for example...
understand???
I hope...
thanks (6 Replies)
Discussion started by: ionral
6 Replies
6. Shell Programming and Scripting
Hi, I have written a script that allows me to repetitively play a music file $N times, which is specified through user input. However, if I want to exit the script before it has finished looping $N times, if I use CTRL+c, I have to CTRL+c however many times are left in order to complete the loop.... (9 Replies)
Discussion started by: hilltop_yodeler
9 Replies
7. Shell Programming and Scripting
Hi Folks,
I have the below feed file named abc1.txt in which you can see there is a title and below is the respective values in the rows and it is completely pipe delimited file ,.
... (3 Replies)
Discussion started by: punpun66
3 Replies
8. Shell Programming and Scripting
I have the following while loop that I put in a script, demo.sh:
while read rna; do
aawork=$(echo "${rna}" | sed -n -e 's/\(...\)\1 /gp' | sed -f rna.sed)
echo "$aawork" | sed 's/ //g'
echo "$aawork" | tr ' ' '\012' | sort | sed '/^$/d' | uniq -c | sed 's/*\(*\) \(.*\)/\2: \... (3 Replies)
Discussion started by: faizlo
3 Replies
9. Shell Programming and Scripting
hello guys
i have bash script to open my routers with username and password
i made script but i have problem this script can/t read password from file
#!/bin/bash
router_file="ips"
passwd="password.txt"
for router in cat ;$router_file do
for pass in cat ;$passwd; do
res=$(curl -m 1 ... (7 Replies)
Discussion started by: manhoud
7 Replies
10. Shell Programming and Scripting
Hi,
when I try to redirect input and the command is described as a string within an array redirection does not work. why?
#!/bin/bash
dir=("tail < ./hello.txt")
tail < ./hello.txt #works
${dir} #does not work (2 Replies)
Discussion started by: heinzel
2 Replies
LEARN ABOUT DEBIAN
libgii
libgii(7) GGI libgii(7)
NAME
libgii - A flexible library for input handling
DESCRIPTION
LibGII is an input library developed by the GGI Project. Its design philosophy is similar to LibGGI, which deals with graphics output.
LibGII is based on the concept of input streams, which virtualize access to the underlying input drivers. Events from various input devices
are abstracted into easy-to-use structures. LibGII also allows the application to join streams together, receiving input from an arbitrary
combination of devices.
LibGII is a separate component from LibGGI, although LibGGI depends on LibGII for input purposes. (LibGGI's input functions are simply
wrappers for LibGII functions.)
ENVIRONMENT VARIABLES
The following outlines the environment variables, intended for the user, which affect the behaviour of LibGII:
GII_INPUT
The default input source(s) and/or filter(s) to use when giiOpen() is called with a NULL argument. The format is: input:inputargs.
Multiple inputs can be specified by this notation: (i1):(i2) ....
Note: This setting does not affect LibGGI visuals automatically opening inputs. Use the GGI_INPUTx variable instead.
GII_DEBUG
The debug level for LibGII:
o 0 or unset : debug output is off; debugging is off
o 255 : all debug output is on
You may also bitwise 'or' any of the following together:
o 2 : debug core
o 32 : misc debugging output
o 64 : debug dynamic library handling
o 128 : debug event handling
GII_DEBUGSYNC
Turn on synchronous debug output, flushing the output buffers before returning from DPRINT calls.
GII_CONFDIR
Override compiled-in path to global config files (Win32 only, but not Cygwin).
Other environment variables specific to filters and inputs are documented in the corresponding manual page.
SEE ALSO
libgii.conf(5), filter-keytrans(7), filter-mouse(7), filter-save(7), filter-tcp(7), input-directx(7), input-linux-kbd(7), input-mouse(7),
input-file(7), input-linux-mouse(7), input-tcp(7), input-linux-evdev(7), input-lk201(7).
libgii-1.0.x 2006-12-30 libgii(7)