Sponsored Content
Full Discussion: plink truncating commands
Top Forums Shell Programming and Scripting plink truncating commands Post 302569770 by PhilHibbs on Tuesday 1st of November 2011 12:58:57 PM
Old 11-01-2011
No, there's no error message, just one of the commands gets truncated. My script is now slightly different and it's going wrong in the same way in a slightly different place, now line 109 byte offset 4289. Here is a snip around where it goes wrong:

Code:
echo :end_logsum:
echo Job Name : SrcVRMigrationExtractUKAddress.442
echo :jobinfo:

gives this:
Code:
hibbsph@cs-uat-etl02:/software/opt/IBM/InformationServer/Server/DSEngine> 
hibbsph@cs-uat-etl02:/software/opt/IBM/InformationServer/Server/DSEngine> echo :end_logsum:
:end_logsum:
hibbsph@cs-uat-etl02:/software/opt/IBM/InformationServer/Server/DSEngine> 
hibbsph@cs-uat-etl02:/software/opt/IBM/InformationServer/Server/DSEngine> echo Job Name : SrcVRMigrationExtractUKAddres
Job Name : SrcVRMigrationExtractUKAddres
hibbsph@cs-uat-etl02:/software/opt/IBM/InformationServer/Server/DSEngine> 
hibbsph@cs-uat-etl02:/software/opt/IBM/InformationServer/Server/DSEngine> echo :jobinfo:
:jobinfo:
hibbsph@cs-uat-etl02:/software/opt/IBM/InformationServer/Server/DSEngine>

The "...Address.442" echo command has been truncated at "...Addres", some others are being truncated also.

For example, later on in the script:

Code:
echo :end_logsum:
echo Job Name : TfmVotersRollMigration.442
echo :jobinfo:

gives this:

Code:
hibbsph@cs-uat-etl02:/software/opt/IBM/InformationServer/Server/DSEngine> 
hibbsph@cs-uat-etl02:/software/opt/IBM/InformationServer/Server/DSEngine> echo :end_logsum:
:end_logsum:
hibbsph@cs-uat-etl02:/software/opt/IBM/InformationServer/Server/DSEngine> 
hibbsph@cs-uat-etl02:/software/opt/IBM/InformationServer/Server/DSEngine> echo Job Name : TfmVotersRollMigration.442
Job Name : TfmVotersRollMigration.442
hibbsph@cs-uat-etl02:/software/opt/IBM/InformationServer/Server/DSEngine> 
hibbsph@cs-uat-etl02:/software/opt/IBM/InformationServer/Server/DSEngine> echo :
:
hibbsph@cs-uat-etl02:/software/opt/IBM/InformationServer/Server/DSEngine>

This time it's the "echo :jobinfo:" that is being truncated to "echo :".

Later on, an echo command is truncated to just "ec" with an error message:

Code:
hibbsph@cs-uat-etl02:/software/opt/IBM/InformationServer/Server/DSEngine> ec
If 'ec' is not a typo you can run the following command to lookup the package that contains the binary:
    command-not-found ec
-bash: ec: command not found

This could be very dangerous if, for example, I did "rm *.bak" and it got truncated to "rm *"!

---------- Post updated at 04:58 PM ---------- Previous update was at 04:20 PM ----------

OK, I think I've resolved it... I have switched from using < to feed the script in, to using plink's -m "c:\dev\telnetcmd.txt" command line option.

Last edited by PhilHibbs; 11-01-2011 at 01:57 PM..
This User Gave Thanks to PhilHibbs For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

`ps` command truncating text

I have some processes that show a long file path as part of the process name and the process name gets truncated off. Does anyone know how to get the full output from the `ps`command so that I can see the whole process name? (9 Replies)
Discussion started by: keelba
9 Replies

2. Shell Programming and Scripting

Truncating a variable

I have a variable that is a full path name and I just want the file name with out the extension. I have figured out how to do this using some temp files but I would really like to avoid that if possible. I know I can do echo ${TMPNAME%.*} to drop the extension is there a similar way to drop... (3 Replies)
Discussion started by: whdr02
3 Replies

3. UNIX for Dummies Questions & Answers

Truncating the last character

Hi all , I am creating the file which holds the create query to run in the sql prompt: so when i am creating: create table XXX( SD Varchar2(10), DF Varchar2(10),) I am getting one comma at the last ,before i am inserting the closing bracket i need to delete that? kindly provide me the... (1 Reply)
Discussion started by: ithirak17
1 Replies

4. Shell Programming and Scripting

How we can use plink?

Hi, How we can use use plink to access unix system using Dos. Could someone send me the commands that can be use in Batch file to call unix system using plink utility. Thanks in advance (0 Replies)
Discussion started by: shekhar_ssm
0 Replies

5. Shell Programming and Scripting

Truncating a mail file

Hi, I have a Unix mail file that I need to truncate, based on the date of the messages. For those not familiar with the format, it is a single file for each user, with the first line of the mail message looking like the following: From user@sitename.com Thu Apr 21 05:40:33 2011 Each... (3 Replies)
Discussion started by: joed
3 Replies

6. Shell Programming and Scripting

PLINK help

Hi Plink users, I am very new in GWAS and decided to use PLINK for this. But I am struggling with file formats. I have one exome data with 200000 SNPs in it. But it is in .txt format. But all the necessary fields are there in different columns. Can you please suggest me how I can create the... (5 Replies)
Discussion started by: smitra
5 Replies

7. Shell Programming and Scripting

nawk is truncating output

Legends, I have 2 files f1 and f2. when i use nawk to compare the difference(subtraction) from 4th column of the file, it truncates the output. can you please help to resolve this. subtraction is (4th col of f1 - 4th col of f2). but it gives only below lines out of 116. I want to print all... (7 Replies)
Discussion started by: sdosanjh
7 Replies

8. Shell Programming and Scripting

Plink (processing multiple commands) using Bash

I'm completely brand new to bash scripting (migrating from Windows batch file scripting). I'm currently trying to write a bash script that will automatically reset "error-disabled" Cisco switch ports. Please forgive the very crude and inefficient script I have so far (shown below). It is... (10 Replies)
Discussion started by: MKANET
10 Replies

9. Shell Programming and Scripting

Need help on Plink

Hi All, Iam a newbie to the plink and need your assistance. I have referred some posts but it doesn't helps me much. I have two steps to do. 1. I have a config file which has a list of servers,username and password. 2. I have a shell script in windows which accepts arguments and need to... (0 Replies)
Discussion started by: cskumar
0 Replies

10. Solaris

How to avoid truncating in ps output ?

Hello, This is Solaris 10 (x86) bash-3.2# cat /etc/release Solaris 10 5/09 s10x_u7wos_08 X86 Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms. Assembled 30 March... (5 Replies)
Discussion started by: solaris_1977
5 Replies
All times are GMT -4. The time now is 11:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy