01-26-2007
you want to write to logfile inside script.
just redirect your output as below.
echo "test" > logout.txt (output redirection)
cat logout.txt (will show you the contents of the text file you can pipeit "|" and give input to other commands if needed.)
10 More Discussions You Might Find Interesting
1. Solaris
I want to know if there is any documentation or any type of information that can give a list of all of the return codes that can be seen in the /var/cron/log. I have seen a couple in my log file. Example: rc=1 and rc=64. (2 Replies)
Discussion started by: sjames
2 Replies
2. Shell Programming and Scripting
Hi there,
I am writing a script to look for tmp log files that have not been access within the last 10 days.
I am using the follwing command within the script:
find /var/tmp -name *log -atime -9 ¦xargs
What I would like to be able to do would be to display a message if there is no... (3 Replies)
Discussion started by: lodey
3 Replies
3. UNIX for Dummies Questions & Answers
Hi All,
Can anyone please let me know the syntax / how to pick up the Return Code ( RC) from the mailx command and return it to SAS uisng 'system()' function and '${?}'.
I am in a process to send the mail automatically with an attachment to bulk users. I have used 'Mailx' and 'Unencode'... (0 Replies)
Discussion started by: manas6
0 Replies
4. UNIX for Dummies Questions & Answers
How do I search for a string within a file and return the names of the file that contain the string? I would like to search directories and sub-directories. (4 Replies)
Discussion started by: bggibson
4 Replies
5. Shell Programming and Scripting
Hi guys,
I am newbie in unix, so I need your help.
I need to right unix function code that can read sample.txt. If sample.txt contains sentence such as "Error due to syntax." then it will return value.
I tried below code, but I got errors.
if
then
echo " There are... (4 Replies)
Discussion started by: adamenderik
4 Replies
6. Shell Programming and Scripting
Folks -
Firstly, I do apologize that my first post here is a question. I am quite familiar with UNIX since our application is running on it. We are trying to automate a few things on our end and I am challenged with a task in hand that requires UNIX scripting. I am totally a newbie in UNIX... (4 Replies)
Discussion started by: sk72
4 Replies
7. Shell Programming and Scripting
Hi expert,
I'm a tester, I want to write a function with bash to collect log which the command I run. the log contains the "shell prompt--->
root@intel_5500_server:, and the last whole command in the shell ----> such as "cd /root/;ls |grep .sh"
to be clear it should be sommething like
... (9 Replies)
Discussion started by: yanglei_fage
9 Replies
8. Shell Programming and Scripting
Hi,
I have an output file like this and after the third record a blank line is getting displayed and i want to remove that. I have been looking at the forums and was trying sed and tr options but unable to make it work. I still see a blank line getting displayed in the output. Please help.
... (9 Replies)
Discussion started by: sudhagk
9 Replies
9. UNIX for Advanced & Expert Users
hi,
I am trying to get the FileType using the File command. I have one file, which holds Group separator along with ASCII character.
It's a Text file.
But when I ran the File command the FileType is coming as "data".
It should be "ASCII, Text file".
Is the latest version of File... (6 Replies)
Discussion started by: Arpitak29
6 Replies
10. Shell Programming and Scripting
Not sure where the problem is. I can run the script without any issue using the following command.
. /opt/app/scripts/cdc_migration.sh
But it fails with the below error when I try it this way
/opt/app/scripts/cdc_migration.sh
/opt/app/scripts/cdc_migration.sh: line 65: return: can only... (1 Reply)
Discussion started by: svajhala
1 Replies
LEARN ABOUT LINUX
byobu-launcher-install
byobu-launcher-install(1) byobu byobu-launcher-install(1)
NAME
byobu-launcher-install - Byobu Launcher installation utility
SYNOPSIS
byobu-launcher-install [-n|--no-logout]
DESCRIPTION
byobu-launcher-install(1) is a simple utilty that will add a line to your $HOME/.profile file which launches byobu(1) any time you login
through ssh(1) or on a console(4).
By default, when users detach from the byobu(1) session they will also logout. Users can change this behavior by adding the
[-n|--no-logout] option when they run byobu-launcher-install(1).
You can disable this behavior entirely at any time with the byobu-launcher-uninstall(1) utility.
SEE ALSO
screen(1), byobu(1), ssh(1), console(4), byobu-launcher-uninstall(1)
http://launchpad.net/byobu
AUTHOR
This manpage and the utility were written by Dustin Kirkland <kirkland@ubuntu.com> for Ubuntu systems (but may be used by others). Permis-
sion is granted to copy, distribute and/or modify this document and the utility under the terms of the GNU General Public License, Version
3 published by the Free Software Foundation.
The complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL on Debian/Ubuntu systems, or in
/usr/share/doc/fedora-release-*/GPL on Fedora systems, or on the web at http://www.gnu.org/licenses/gpl.txt.
byobu 3 Jan 2010 byobu-launcher-install(1)