I want to output screen messages to a logfile when executing an automated script. I have tried the script and command to do this but with no luck.
Thanks,
Nicole (5 Replies)
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)
Hi,
I want, if a line is more than 80 characters length then put a new line with 4 space after each 80 characters to indent the data at same position.
Input:
200 Geoid and gravity anomaly data of conjugate regions of Bay of Bengal and Enderby Basin: New constraints on breakup and early... (3 Replies)
Hi,
I want to make sed write a part of fileA (first 7 lines) to file1 and the rest of fileA to file2 in a single call and single line in sed. If I do the following:
sed '1,7w file1; 8,$w file2' fileA
I get only one file named file1 plus all the characters following file1. If I try to use curly... (1 Reply)
How to redirect the output to multiple files without putting on console
I tried tee but it writes to STDOUT , which I do not want.
Test.sh
------------------
#!/bin/ksh
echo "Hello " tee -a file1 file2
----------------------------
$>./Test.sh
$>
Expected output:
-------------------... (2 Replies)
I have a string with escape differentiators as a result of searching for a file using find. Essentially find returned to my shell variable several absolute paths each ending with the file name and each path/file separated by \n.
Echo recognizes the escape sequence and is able to print the paths... (3 Replies)
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)
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)
I am revisiting the problem of sentence splitting. I have a Perl Script which splits a para into sentences, but acronyms and short forms create an issue
#!/usr/bin/perl
use feature qw/say/;
use strict;
use warnings;
my $s;
my @arr;
while(<>) {
chomp $_;
$s .= $_ . " ";
}
@arr... (2 Replies)
MYSQL(1) General Commands Manual MYSQL(1)NAME
mysql - text-based client for mysqld, a SQL-based relational database daemon
SYNOPSIS
mysql [-B|--batch] [-#|--debug= logfile] [-T|--debug-info] [-e|--exec= command] [-f|--force] [-?|--help] [-h|--host= hostname]
[-n|--unbuffered] [-p[pwd]] [--password=[pwd]] [-P|--port= pnum] [-q|--quick] [-r|--raw] [-s|--silent] [-S|--socket= snum] [-u|--user=
uname] [-v|--verbose] [-V|--version] [-w|--wait]
DESCRIPTION
The mysql program provides a curses-based interface to the SQL-based database server daemon, mysqld(1). Full fuller documentation, refer
to the HTML documents installed with the package.
OPTIONS
-B|--batch
Print results with a tab as separator, each row on a new line.
-#|--debug=logfile
Employ the specified debug log.
-T|--debug-info
Print debug information upon exiting.
-e | --exec=command
Execute the specified command and quit (--batch is implicit).
-f|--force
Continue even if the face of a SQL error.
-?|--help
Display a help message and exit.
-h|--host=hostname
Connect to the specified host.
-n|--unbuffered
Flush the buffer after each query.
-p|--password[=pwd]
Employ the specified password when connecting to the database server. If a password is not supplied, it will be requested interac-
tively.
-P|--port=pnum
Employ the specified port number for connecting to the database server.
-q|--quick
Do not cache the result; print it row by row. This may slow down the server if the output is suspended.
-r|--raw
Write fields without conversion. (used with --batch).
-s|--silent
Silent mode: reduce the amount of output.
-S|--socket=snum
Employ the specified socket file for connecting to the database server.
-u|--user=uname
Employ the specified user name for logging in to the server.
-v|--verbose
Verbose mode: write more Specifying this option twice produces a tabular output format.
-V|--version
Print the mysql version number and exit.
-w|--wait
Wait and retry if the database server connection is down.
FILES
/depot/bin/mysql executable
/depot/bin/mysqld executable
/depot/bin/safe_mysqld
executable shell script for starting mysqld safely
/site/var/mysql/data location of database files
EXAMPLE
You can also read a backup dump file back into MySQL with:
mysql database < backup-file.sql
SEE ALSO
isamchk (1), isamlog (1), mysqlaccess (1), mysqladmin (1), mysqlbug (1), mysqld (1), mysqldump (1), mysqlshow (1), msql2mysql (1), perror
(1), replace (1), safe_mysqld (1), which1 (1), zap (1),
AUTHOR
Ver 6.3, distribution 3.20.20 Michael (Monty) Widenius (monty@tcx.se), TCX Datakonsult AB (http://www.tcx.se). This software comes with no
warranty. Manual page by R. P. C. Rodgers, Lister Hill National Center for Biomedical Communication, U.S. National Library of Medicine
(rodgers@nlm.nih.gov).
13 June 1997 MYSQL(1)