Reg: execution of tail statement in PUTTY


 
Thread Tools Search this Thread
Operating Systems HP-UX Reg: execution of tail statement in PUTTY
# 1  
Old 09-21-2006
Reg: execution of tail statement in PUTTY

We are using PUTTY to connect to Remote Unix Server. When I run the following shell script statement, I do not get the desired output.
tail -num test.txt > test.out
here "num" is any number for example say as 2000.
What happens is..test.out contains around 400 rows only out of 2000. It truncates remaining data.
It happens only when I connect to a particular Unix server, on which we need work.
If I run the same statement by connecting to other unix server, it works fine.

Can anybody tell me ..is this a privilege problem or something else?

Actually, this tail statement is part of some shell script file and because of that particular statement, we are not getting the desired output.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

UNIX Sqlplus - Capture the sql statement about to run and execution status

Greetings Experts, I am on AIX using ksh. Created a unix script which generates the CREATE OR REPLACE VIEW ... and GRANT .. statements, which are placed in a single .txt file. Now I need to execute the contents in the file (there are around 300 view creation and grant statements) in Oracle and... (4 Replies)
Discussion started by: chill3chee
4 Replies

2. Shell Programming and Scripting

Convert Update statement into Insert statement in UNIX using awk, sed....

Hi folks, I have a scenario to convert the update statements into insert statements using shell script (awk, sed...) or in database using regex. I have a bunch of update statements with all columns in a file which I need to convert into insert statements. UPDATE TABLE_A SET COL1=1 WHERE... (0 Replies)
Discussion started by: dev123
0 Replies

3. Shell Programming and Scripting

Joining multiple files tail on tail

I have 250 files that have 16 columns each - all numbered as follows stat.1000, stat.1001, stat.1002, stat.1003....stat.1250. I would like to join all 250 of them together tail by tail as follows. For example stat.1000 a b c d e f stat.1001 g h i j k l So that my output... (2 Replies)
Discussion started by: kayak
2 Replies

4. Shell Programming and Scripting

Execution problem with IF statement

Hi, I am trying to execute the below statment in my script.am getting the error as " syntax error near unexpected token 'else'. Is If statement is correct. if ]; then if ]; then cp $src_dir/import-serv/$q_dirs*.txt $tgt_dir/$q_dirs/import-serv/ else cdsgq_dir=`echo... (3 Replies)
Discussion started by: kirankumar
3 Replies

5. Shell Programming and Scripting

Expect Issue Serial Forground Execution vs Concurrent Background Execution

I have an expect script that interrogates several hundred unix servers for both access and directories therein using "ssh user@host ls -l /path". The combination of host/path are unique but the host may be interrogated multiple times if there are multiple paths to test. The expect script is run... (2 Replies)
Discussion started by: twk
2 Replies

6. UNIX for Dummies Questions & Answers

reg putty problem

Hi, i am using PUTTY 0.51 release for connecting the Red hate linux box in SSH mode. its working fine but i can't able to scoll the scoll bar using scroll wheel inthe mouse. please suggest me how to solve it. thanks in advance. thanks and regards, ilayans (2 Replies)
Discussion started by: ilayans
2 Replies

7. Shell Programming and Scripting

How is use sselect statement o/p in insert statement.

Hi All, I am using Unix ksh script. I need to insert values to a table using the o/p from a slelect statement. Can anybody Help! My script looks like tihs. ---`sqlplus -s username/password@SID << EOF set heading off set feedback off set pages 0 insert into ${TB_NAME}_D... (2 Replies)
Discussion started by: nkosaraju
2 Replies

8. Shell Programming and Scripting

If statement - How to write a null statement

In my ksh script, if the conditions of a if statement are true, then do nothing; otherwise, execute some commands. How do I write the "do nothing" statement in the following example? Example: if (( "$x"="1" && "$y"="a" && "$z"="happy" )) then do nothing else command command fi... (3 Replies)
Discussion started by: april
3 Replies

9. Shell Programming and Scripting

Reg: Gzip

Hi , I want gzip a folder te55 which has got 3 files test1.test2,test3 the name of the gzipped folder should be te55.gz with the 3 files as test1,test2,test3 itself... Is it possible... thanks in advance sam (5 Replies)
Discussion started by: sam99
5 Replies

10. UNIX for Dummies Questions & Answers

korn shellscript execution context - exit statement

Hi all, Could someone please explain to me the shell invocation process when running a script. How do I stop the shell from logging out when it reaches an exit statement in the script? if ; then echo 'Failed to copy ${FILE}.fmx to ${J2_HOME}/dev/rsc' ... (3 Replies)
Discussion started by: richgi
3 Replies
Login or Register to Ask a Question
MYSQLTEST(1)						       MySQL Database System						      MYSQLTEST(1)

NAME
mysqltest - program to run test cases mysqltest_embedded - program to run embedded test cases SYNOPSIS
mysqltest [options] [db_name] mysqltest_embedded [options] [db_name] DESCRIPTION
The mysqltest program runs a test case against a MySQL server and optionally compares the output with a result file. This program reads input written in a special test language. Typically, you invoke mysqltest using mysql-test-run.pl rather than invoking it directly. mysqltest_embedded is similar but is built with support for the libmysqld embedded server. Features of mysqltest: o Can send SQL statements to MySQL servers for execution o Can execute external shell commands o Can test whether the result from an SQL statement or shell command is as expected o Can connect to one or more standalone mysqld servers and switch between connections o Can connect to an embedded server (libmysqld), if MySQL is compiled with support for libmysqld. (In this case, the executable is named mysqltest_embedded rather than mysqltest.) By default, mysqltest reads the test case on the standard input. To run mysqltest this way, you normally invoke it like this: shell> mysqltest [options] [db_name] < test_file You can also name the test case file with a --test-file=file_name option. The exit value from mysqltest is 0 for success, 1 for failure, and 62 if it skips the test case (for example, if after checking some preconditions it decides not to run the test). mysqltest supports the following options: o --help, -? Display a help message and exit. o --basedir=dir_name, -b dir_name The base directory for tests. o --character-sets-dir=path The directory where character sets are installed. o --compress, -C Compress all information sent between the client and the server if both support compression. o --cursor-protocol Use cursors for prepared statements. o --database=db_name, -D db_name The default database to use. o --debug[=debug_options], -#[debug_options] Write a debugging log if MySQL is built with debugging support. The default debug_options value is 'd:t:S:i:O,/tmp/mysqltest.trace'. o --debug-check Print some debugging information when the program exits. o --debug-info Print debugging information and memory and CPU usage statistics when the program exits. o --host=host_name, -h host_name Connect to the MySQL server on the given host. o --include=file_name, -i file_name Include the contents of the given file before processing the contents of the test file. The included file should have the same format as other mysqltest test files. This option has the same effect as putting a --source file_name command as the first line of the test file. o --logdir=dir_name The directory to use for log files. o --mark-progress Write the line number and elapsed time to test_file.progress. o --max-connect-retries=num The maximum number of connection attempts when connecting to server. o --max-connections=num The maximum number of simultaneous server connections per client (that is, per test). If not set, the maximum is 128. Minimum allowed limit is 8, maximum is 5120. This option is available from MySQL 5.1.45. o --no-defaults Do not read default options from any option files. If used, this must be the first option. o --plugin-dir=path The directory in which to look for plugins. It may be necessary to specify this option if the default_auth argument is used for the connect() command to specify an authentication plugin but mysqltest does not find it. This option was added in MySQL 5.5.7. o --password[=password], -p[password] The password to use when connecting to the server. If you use the short option form (-p), you cannot have a space between the option and the password. If you omit the password value following the --password or -p option on the command line, you are prompted for one. o --port=port_num, -P port_num The TCP/IP port number to use for the connection. o --protocol={TCP|SOCKET|PIPE|MEMORY} Choose the protocol for communication with the server. SOCKET is default. The --protocol option is available from MySQL 5.1.51. It is ignored if running with the embedded server. o --ps-protocol Use the prepared-statement protocol for communication. o --quiet Suppress all normal output. This is a synonym for --silent. o --record, -r Record the output that results from running the test file into the file named by the --result-file option, if that option is given. It is an error to use this option without also using --result-file. o --result-file=file_name, -R file_name This option specifies the file for test case expected results. --result-file, together with --record, determines how mysqltest treats the test actual and expected results for a test case: o If the test produces no results, mysqltest exits with an error message to that effect, unless --result-file is given and the named file is an empty file. o Otherwise, if --result-file is not given, mysqltest sends test results to the standard output. o With --result-file but not --record, mysqltest reads the expected results from the given file and compares them with the actual results. If the results do not match, mysqltest writes a .reject file in the same directory as the result file, outputs a diff of the two files, and exits with an error. o With both --result-file and --record, mysqltest updates the given file by writing the actual test results to it. o --server-arg=value, -A value Pass the argument as an argument to the embedded server. For example, --server-arg=--tmpdir=/tmp or --server-arg=--core. Up to 64 arguments can be given. o --server-file=file_name, -F file_name Read arguments for the embedded server from the given file. The file should contain one argument per line. o --server-public-key-path=file_name The path name to a file containing the server RSA public key. The file must be in PEM format. The public key is used for RSA encryption of the client password for connections to the server made using accounts that authenticate with the sha256_password plugin. This option is ignored for client accounts that do not authenticate with that plugin. It is also ignored if password encryption is not needed, as is the case when the client connects to the server using an SSL connection. The server sends the public key to the client as needed, so it is not necessary to use this option for RSA password encryption to occur. It is more efficient to do so because then the server need not send the key. For additional discussion regarding use of the sha256_password plugin, including how to get the RSA public key, see The SHA-256 Authentication Plugin[1]. This option is available only if MySQL was built using OpenSSL. It was added in MySQL 5.6.6 under the name --server-public-key and renamed in 5.6.7 to --server-public-key-path. o --silent, -s Suppress all normal output. o --skip-safemalloc Do not use memory allocation checking. o --sleep=num, -T num Cause all sleep commands in the test case file to sleep num seconds. This option does not affect real_sleep commands. As of MySQL 5.0.23, an option value of 0 can be used, which effectively disables sleep commands in the test case. o --socket=path, -S path The socket file to use when connecting to localhost (which is the default host). o --sp-protocol Execute DML statements within a stored procedure. For every DML statement, mysqltest creates and invokes a stored procedure that executes the statement rather than executing the statement directly. o --tail-lines=nn Specify how many lines of the result to include in the output if the test fails because an SQL statement fails. The default is 0, meaning no lines of result printed. o --test-file=file_name, -x file_name Read test input from this file. The default is to read from the standard input. o --timer-file=file_name, -m file_name If given, the number of millisecond spent running the test will be written to this file. This is used by mysql-test-run.pl for its reporting. o --tmpdir=dir_name, -t dir_name The temporary directory where socket files are created. o --user=user_name, -u user_name The MySQL user name to use when connecting to the server. o --verbose, -v Verbose mode. Print out more information about what the program does. o --version, -V Display version information and exit. o --view-protocol Every SELECT statement is wrapped inside a view. This option was added in MySQL 5.0.19. COPYRIGHT
Copyright (C) 2006, 2013, Oracle and/or its affiliates. All rights reserved. This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. NOTES
1. The SHA-256 Authentication Plugin http://dev.mysql.com/doc/refman/5.6/en/sha256-authentication-plugin.html SEE ALSO
For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available online at http://dev.mysql.com/doc/. AUTHOR
Oracle Corporation (http://dev.mysql.com/). MySQL 01/23/2014 MYSQLTEST(1)