[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::digital_unix

Title:DIGITAL UNIX(FORMERLY KNOWN AS DEC OSF/1)
Notice:Welcome to the Digital UNIX Conference
Moderator:SMURF::DENHAM
Created:Thu Mar 16 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:10068
Total number of notes:35879

9779.0. "rcp file with name contained colons" by HGOSPS::MICKWIDLAM () Mon May 12 1997 06:31

    I have a short question would like to ask and may be someone had asked
    before.
    
    I have a file with the name contained colon. I need to use rcp to copy
    the file to another host. From rcp's man page, it stated:
    
    "
    However, since rcp assumes that a colon terminates a hostname, local
    filenames or directory names must have a \ (backslash) inserted before
    any colons embedded in the name.
    "
    
    I used the backslash but still fail
    # rcp te:st:mick hgcs18:\te\:st\:mick
    te: Unknown host
    
    Anyone seen this before?
    
    Thanks and regards,
    Mickwid.
T.RTitleUserPersonal
Name
DateLines
9779.1Need protection from the shell's quote strippingUNIFIX::HARRISJuggling has its ups and downsMon May 12 1997 09:3610
    Most likely the first level of \ removal occurred by the shell.  You
    need to protect the \ from the shell by enclosing your filename within
    quotes '...'
    
    Dealing with character quoting is one of the more difficult aspects of
    working with shells.  It gets to be even more fun, if your quoted text
    is passed thru multiple layers of shells where each layer can strip off
    a layer of quoting.
    
    					Bob Harris
9779.2SMURF::DANIELEMon May 12 1997 10:497
>rcp te:st:mick

it looks like this part is failing.  

Is "te" a valid host name?

Mike
9779.3SMURF::SCOTTMon May 12 1997 11:549
>   "
>   
>   I used the backslash but still fail
>   # rcp te:st:mick hgcs18:\te\:st\:mick
>     ---------------------^^    


Try again with the "\" in front of the colon -- hgcs18\:te\:st\:mick
               ---------------------------------------^^
9779.4BIGUN::nessus.cao.dec.com::MayneA wretched hive of scum and villainyMon May 12 1997 19:146
rcp looks for host names on both parameters, not just the second one. Your local 
filename has colons in it, so rcp interprets that as a host name.

Put backslashes in the first name as well as the second.

PJDM