My supervisor keep getting "stdin not tty" or something like that when he pipe or redirect input into a program. Others
don't seem to get this message. Is there some way I can help him to fix or turn this off?
Thx in advance (1 Reply)
can you redirect STDIN with command arguments?
I have tried this approach:
# ./script -option <argument1> <argument2> 0<$2
# $2: ambiguous redirect
Is this possible? (4 Replies)
For windows was pretty simple to redirect the std in a and out of a
child process for "cmd.exe " command prompt terminal to a socket using connected pipes passed to a new process in the STARTUPINFO structure.
BOOL b = ::CreatePipe((LPHANDLE)h_stdInRead,(LPHANDLE)hsdtInWriteTmp, &SecAttrib,... (1 Reply)
Hi:
I have the next script on ksh
#!/usr/bin/ksh
cd $FUENTES
qdesign <<-!
\$/opt/cognos/ph843e/bin/qtp <<-!
\$/opt/cognos/ph843e/bin/quiz <<-!
!
!
!
This script is very simple, i want to nest three process quiz into qtp, and this into qdesign.
When I run it , i receive the... (5 Replies)
Hi:
I have the next script on ksh
#!/usr/bin/ksh
cd $FUENTES
qdesign <<-!
\$/opt/cognos/ph843e/bin/qtp <<-!
\$/opt/cognos/ph843e/bin/quiz <<-!
!
!
!
This script is very simple, i want to nest three process quiz into qtp, and this into qdesign.
When I run it , i receive the next... (2 Replies)
I am unable to use STDIn redirection with < (commands)
When I do the following, both approaches work and give the same results:
1.
$ printf "aaa\nbbb\n" > file1
$ printf "111\n222\n" > file2
$ cat file1 file2
aaa
bbb
111
2222.
$ cat <(printf "aaa\nbbb\n") <(printf "111\n222\n")
aaa... (8 Replies)
Hi,
i know how to
a) redirect stdout and stderr to one file,
b) and write to two files concurrently with same output using tee command
Now, i want to do both the above together.
I have a script and it should write both stdout and stderr in one file and also write the same content to... (8 Replies)
Hi,
I am working on a project where I have to generate and execute nasm code on-the-fly. I generate the code in a file program.asm and then execute it.This output is to stdout which i redirect to an output file which i read back to compare results:
system("nasm -f elf program.asm >... (5 Replies)
Hi
Im trying to do the following:
grep -H Date: out/* | sed 's/':'/ /' | awk '$4 ~ /^/ {print $1}' | while read VARIABLE; do
awk '{print $1,$3,$2}' $VARIABLE | sed (take stdin and replace a string in $VARIABLE)
done
What this is basically doing is finding all files with Date: in... (11 Replies)
Hi there,
I need to execute a command in the bash. The program prints some standard (output and) error and then wants the user to choose one of several options and type the according input. I am trying to solve this issue in a bash script but also running into some circular dependency. How can I... (7 Replies)
Discussion started by: fredestet
7 Replies
LEARN ABOUT DEBIAN
qsexec
QSEXEC(1) qsexec man page QSEXEC(1)NAME
qsexec - parses the data received via stdin and executes the defined command on a pattern match.
SYNOPSIS
qsexec -e <pattern> [-t <number>:<sec>] [-c <pattern> [<command string>]] [-p] [-u <user>] <command string>
DESCRIPTION
qsexec reads log lines from stdin and searches for the defined pattern. It executes the defined command string on pattern match.
OPTIONS -e <pattern>
Specifes the search pattern causing an event which shall trigger the command.
-t <number>:<sec>
Defines the number of pattern match within the the defined number of seconds in order to trigger the command execution. By default,
every pattern match causes a command execution.
-c <pattern> [<command string>]
Pattern which clears the event counter. Executes optionally a command if an event command has been executed before.
-p Writes data also to stdout (for piped logging).
-u <name>
Become another user, e.g. www-data.
<command string>
Defines the event command string where $0-$9 are substituted by the submatches of the regular expression.
EXAMPLE
Executes the deny.sh script providing the IP address of the client causing a mod_qos(031) messages whenever the log message appears 10
times within at most one minute:
ErrorLog "|qsexec -e 'mod_qos(031).*, c=([0-9.]*)' -t 10:60 '/bin/deny.sh $1'"
SEE ALSO qsfilter2(1), qsgeo(1), qsgrep(1), qslog(1), qslogger(1), qspng(1), qsrotate(1), qssign(1), qstail(1)AUTHOR
Pascal Buchbinder, http://opensource.adnovum.ch/mod_qos/
mod_qos utilities 10.8 June 2012 QSEXEC(1)