New answers tagged

1

This happens to me on OpenSSL for IBM AIX, which also outputs this same leading (stdin)=. Seeing as you're using a shell one-liner, you can isolate the resulting hash by simply deleting the prefix with sed: echo -n "$CTFid" | openssl dgst -sha1 -hmac "key" | sed "s/(stdin)=//";


0

The previous answer is correct, but I would encourage you to go further and learn how to use strace. strace attaches to a process and then prints each system call the process is making to your terminal. This can be very educational and maybe a bit overwhelming. Each system call has a man page and you'll see every little action the program is doing in ...


3

Look at the man page for fork(2). A child process inherits the parent's file descriptors, including standard input and standard output. For a single command, the shell simply lets the child process inherit those descriptors and write its output to the terminal. For a pipeline, it forks each process, sets up a pipe between the output of one and the input of ...


0

Likely a incomplete implementation https://www.cygwin.com/ml/cygwin/2016-01/msg00085.html


2

The terminal is conceptually separate from process stdin and stdout. This can be confusing since we talk about "terminal" both for the keyboard input and the screen output. However, a process can read input from the keyboard without echoing it back to the screen. E.g., when you log in, your password is read from your typed input, but it doesn't appear on ...


0

No, because stdin and stdout are separate channels. Unless you explicitly pipe, there is no connection. You don't expect the output from your print statements to be the input for a subsuquent input statement, do you?


0

main.sh #!/bin/bash set -e if [ ! -p in ]; then mkfifo in fi tail -f in | java -jar app.jar Send command to the application with following syntax echo "command" > /home/user/in


0

Give this a try: mkfifo /appdir/in nohup java -jar app.jar < /appdir/in & exit 0 The test: $ ./startapp.sh $ printf "%s\n" "mytext" >> /appdir/in $ cat nohup.out mytext $ There is additional control to add in order to manage the lifecycle of the /appdir/in named pipe.



Top 50 recent answers are included