LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-06-2011, 03:31 PM   #1
ericrichter
LQ Newbie
 
Registered: Aug 2011
Posts: 1

Rep: Reputation: Disabled
ssh returns fqdn betwee escape codes


I do this in a script:

IK=`ssh -nq user@host sudo su - wasuser -c "date`

echo $IK will return:
Sat Aug 6 22:28:51 CEST 2011

echo $IK>ik.txt
and then
vi ik.txt
will show in vi:
^[]0;hostname.domain^GSat Aug 6 22:28:51 CEST 2011

How can I prevent sending the hostname in the output?
 
Old 08-07-2011, 06:28 AM   #2
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
For me it’s working as expected - no extra chars. Can you check the length of the string which is returned to distinguish whether it’s added local or coming from the remote site.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] SSH Banner Escape Codes? pshankland Red Hat 1 09-23-2010 06:47 AM
[SOLVED] printer escape codes smeezekitty Programming 6 10-13-2009 11:52 PM
How to handle ansi escape codes in C? john.daker Programming 2 11-13-2008 05:26 AM
Sending escape codes through CUPS Tracker77 Linux - Desktop 1 02-10-2008 11:45 AM
Using escape codes to print barcodes c2tidis Linux - Software 0 09-29-2005 11:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration