11-02-2007
unix script
This did not work, the program bombed out and put out my standard output. Not sure if this is valid for unix script. It did not like the scriptname.
Thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello All,
I am using the below code:
#!/bin/sh
/omp/bin/TICLI "op:alarm,all" > filename
for getting command output and then putting the output into newfile but the problem is this, that not the complete output goes into newfile and the script stops.
for example: if this commands gives... (18 Replies)
Discussion started by: wakhan
18 Replies
2. UNIX Desktop Questions & Answers
I would like to use a terminal session to ssh to switches and routers. I need to capture data while logged into switches to a file I can email for troubleshooting.
I use termial to log into Cisco switch, run the sh tech command, and then sent the output to cisco. Is there a way to run a... (4 Replies)
Discussion started by: tdelliott
4 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
I have a script that bulk loads thousands of lines of data. I need to log the output during the execution of the script.
I know I can redirect (">") the output to a file; however, I want the output going to both the screen and the log file.
I thought I could use pipe to pipe the... (10 Replies)
Discussion started by: orahi001
10 Replies
4. Shell Programming and Scripting
Hi,
I would need to log the whole screen ouput to a log file.
All Inputs from the Agent, all echo´s and DBMS Outputs from the PL/SQL.
Basicly everything what I can see during the run on the screen.
I tried it already with
#exec 2>$BASELOG/RUN.log
#exec 1>$BASELOG/RUN.log
#exec >... (1 Reply)
Discussion started by: enjoy
1 Replies
5. Shell Programming and Scripting
do you have any simple script on how to change the color and font of a string in a script example
echo "===================================="
echo " sample color script"
echo "===================================="
echo " hello "
echo " bye"
on hello,... (3 Replies)
Discussion started by: lhareigh890
3 Replies
6. Shell Programming and Scripting
I am trying to get following result from the scipt I have. First time it generates the o/p in correct format. However if I run it again it appends to the existing file. I would like to see o/p on screen as well as save it in file. Everytime it should create new file.
## I/P file
0174
0175... (3 Replies)
Discussion started by: dynamax
3 Replies
7. UNIX for Dummies Questions & Answers
Hi guys,
Just want to ask how can I make a script that will perform like this.
1. Execute the command
2. Then the output of the command will be redirected to a file
2. The file that has been created will have a date on it equivalent to the date and time it was created (or maybe after the... (5 Replies)
Discussion started by: rymnd_12345
5 Replies
8. Shell Programming and Scripting
Good afternoon,
I have been searching the web, and these forums for help. I will try my best to explain the issue, and what my desired results are.
I am doing queries in MYSQL, and need the output to be sent to a file. That file needs to have things with the same ID on the same line. To... (14 Replies)
Discussion started by: brianjb
14 Replies
9. Programming
So I have ported a C++ program from windows to linux
and when I run it from terminal all is well. However
when executed from file manager there is no screen output.
The program runs and does what it should, just the problem
of not knowing if there are errors or if its even complete. Is there a... (12 Replies)
Discussion started by: pinbot
12 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
I am trying to out of shell script when i run it
like
sh /mypath/abc.sh
....a screen log should be generated whenever i input the values, when above the script prompt for values
Regards
Amarendra (3 Replies)
Discussion started by: amar1208
3 Replies
LEARN ABOUT REDHAT
logsave
LOGSAVE(8) System Manager's Manual LOGSAVE(8)
NAME
logsave - save the output of a command in a logfile
SYNOPSIS
logsave [ -asv ] logfile cmd_prog [ ... ]
DESCRIPTION
The logsave program will execute cmd_prog with the specified argument(s), and save a copy of its output to logfile. If the containing
directory for logfile does not exist, logsave will accumulate the output in memory until it can be written out. A copy of the output will
also be written to standard output.
If cmd_prog is a single hyphen ('-'), then instead of executing a program, logsave will take its input from standard input and save it in
logfile
logsave is useful for saving the output of initial boot scripts until the /var partition is mounted, so the output can be written to
/var/log.
OPTIONS
-a This option will cause the output to be appended to logfile, instead of replacing its current contents.
-s This option will cause logsave to skip writing to the log file text which is bracketed with a control-A (ASCII 001 or Start of
Header) and control-B (ASCII 002 or Start of Text). This allows progress bar information to be visible to the user on the console,
while not being written to the log file.
-v This option will make logsave to be more verbose in its output to the user.
AUTHOR
Theodore Ts'o (tytso@mit.edu)
SEE ALSO
fsck(8)
E2fsprogs version 1.44.1 March 2018 LOGSAVE(8)