Tagged Questions
1
vote
1answer
43 views
Unsure about the behaviour of my script when writing to log file
I have a very simple ksh script and at certain points I want to write to a log file. I use the following commands in two places...
print "Directory listing 1:\n" > ${LogFile}
ll >> ...
1
vote
1answer
438 views
How can I get vsftpd version into shell variable?
I want to get vsftpd version into shell variable. I can get it to console with ease:
# vsftpd -version
vsftpd: version 2.2.2
Also I can get a lot of other info into variable:
# i=`bash --version ...
5
votes
1answer
365 views
How to send output to both screen and mail?
I use the following to send an email at the end of a script.
echo "Script finished on `date`" | /usr/bin/Mail -s "Script complete" "myaccount@myserver.com".
However, I want to echo the same message ...
4
votes
2answers
246 views
how to redirect terminal output to multiple log files
I've been trying redirect output to logfiles but should NOT be displayed on terminal, but following command does output both on terminal and in logs. Any ideas are appreciated.
(some_cmd | tee -a ...
5
votes
2answers
2k views
tail program output to file in Linux
I know we can use below format to redirect the screen output to a file:
$ your_program > /tmp/output.txt
However when I used below command, it says "-bash: /home/user/errors.txt: Permission ...