Tag Info

New answers tagged

2

You need to combine the output of STDERR and STDOUT prior to piping it to logger. Try this instead: /home/dirname/application_name -v 2>&1 | logger & Example $ echo "hi" 2>&1 | logger & [1] 26818 [1]+ Done echo "hi" 2>&1 | logger $ sudo tail /var/log/messages Apr 12 17:53:57 greeneggs saml: hi You can ...


0

You should mkfifo a bidirectional |pipe between the two machines and write to it instead of relying on pasting into a putty terminal. But if you must use putty, then you should turn off its flow control in the settings and use raw mode - stty raw on the host side and find the raw terminal option in putty's settings.


1

You can get pretty close to what you want by using the alternate screen buffer. Most (all?) terminal emulators have 2 screen buffers that you can switch between. So you switch to the alternate screen buffer, run your commands, and then switch back to the main one. Just run the following before your commands: tput smcup And at the end, run tput rmcup ...


4

I'm not familiar with AutoHotKey, so if you can't find any solution there, read on. POSIX specifies the read command, which allows taking a line of input while stifling the terminal echo (that's what you see when you type) with -s. This is also a bash built-in, but you might check your system to see if it is present as a standalone. Otherwise, looking ...


1

The feature wasn't added until version 2.2 http://www.nano-editor.org/dist/v2.2/TODO For version 2.2: Allow nano to work like a pager (read from stdin) [DONE] and CentOS6 uses nano-2.0.9-7 (http://mirror.centos.org/centos/6/os/x86_64/Packages/) If you decided you want the latest version, you can download from the upstream site ...


4

I like @Stephane's answer for the general case, but here's something more appropriate for your specific example. Start up MySQL interactive mode and use the source command to run SQL scripts. $ mysql -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 947 Server version: 5.1.73-1 (Debian) Type ...


10

cat script.sql - | mysql -p database


0

Some things to be aware of regarding named pipes: A pipe cannot - unlike a file - have multiple readers. Once its content is read it's gone. So you need to loop, i.e. you'll need to constantly push content into the pipe from the writer. I've been searching for an answer myself to this question and the only other thing I've been able to come up with is ...



Top 50 recent answers are included