Yes , you can run any command in background
& refers the command to be run in the background.
But the best option would be run the command in the cron.
there by the command itself does not depend on the terminal.
Hi,
I have an expect script that logs into a host (via ssh) requests the hostid then exits... I am happy with that.
However how can I run the same script in a kind of 'while read line' and enter lots of hosts? My knowledge is still very limited (as you will soon see) so any other ideas would... (2 Replies)
Hello,
I am trying to write an expect script that will ssh into a large number of Cisco routers and add some commands via the cli. The script I wrote works great for one host however I have over 350 routers that this needs to be added to. The problem is I cannot get the script to read the file of... (1 Reply)
i have a script which takes input from user, if user gives either Y/y then it should continue, else it should quit by displaying user cancelled.
#!/bin/sh
echo " Enter your choice to continue y/Y OR n/N to quit "
read A
if
then
echo " user requested to continue "
##some commands... (7 Replies)
Hi,
i have one problem with this script:
-------------------------------
cat hostid_gathering
#!/bin/bash
cat /home/user1/ip_switch | while read LINE; do
echo $LINE
/home/user1/expect_script2
done
------------------------------
cat /home/user1/expect_script2
#!/usr/bin/expect... (6 Replies)
Hi All,
Hoping you can help as im in desperate need... I'm very new to unix scripting so apoligies,
I have setup an expect script in order to log into a node on our network, This will provide an output as per the below
*********** information:
*************: n/a
TEST IP : n/a
... (18 Replies)
Hi,
I am using expect to ssh to a remote host and run a program on the remote machine which has a variable runtime. I need to wait until it finishes so I can grab the output file of this program. I am trying to use the output of grep to know when the process finishes. I am trying to capture... (0 Replies)
I know something simple is missing here, "log_user 1" is set . . . after this utility opens ${InFile} (handle? for IntInFile) it needs to look for something to appear in the file ${IntInFile} and then send it to the spawned process. Then I am locking the file ${IntInFile} and clearing it out -... (0 Replies)
Hi
I am new to Expect scripting. I have to connect to a remote server and capture the output. Here I need output of " send "list registered\r"" to be stored in a file. but after execution, /tmp/capture.txt is of 0 byte
#!/usr/bin/expect
spawn ssh abc@10.10.10.10 -p 5022
expect... (2 Replies)
Hey All,
I am writing one script using expect, that script which is used in spawn will accepts only 1. Enter 2. Ctrl+c
Press Control-C to exit, Enter to proceed.
Could some one share some thoughts to send the above user inputs in linux expect block ?
Thanks,
Sam (0 Replies)
Discussion started by: SCHITIMA
0 Replies
LEARN ABOUT SUSE
irexec
IREXEC(1) FSF IREXEC(1)NAME
irexec - run programs with one button press
SYNOPSIS
irexec [options] [config_file]
DESCRIPTION
This program lets you execute arbitrary commands on an IR signal decoded by lircd, the LIRC daemon. You can give irexec a command line
parameter which has to be a name of a valid config file. If no command line parameters are given irexec reads the default config file which
is usually ~/.lircrc.
If irexec executes a program it will wait until this program terminates. So append a '&' to the command string if you don't want that.
The config string consists of the command to be run.
-h --help
display usage summary
-v --version
display version
-d --daemon
run in background
-n --name
use this program name
OPTIONS
If you add the --daemon option irexec will fork to background. That way you can easily start irexec from an init script. In this case you
should specify a config file on the command line as irexec won't be able to find your home directory. Potential uses are shutting down the
computer, starting a dial-up connection etc.
NOTE
If you start irexec, it reads your ~/.lircrc and reacts only on prog= entries that point to irexec. If you have included more than one pro-
gram in your .lircrc, then start all these programs, they react itself only to their according entries in .lircrc.
SEE ALSO
The documentation for lirc is maintained as html pages. They are located under html/ in the documentation directory.
irexec 0.8.7pre1 May 2010 IREXEC(1)