Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2007
    Posts
    57

    Unanswered: Scripting passowrd with metacharacters

    I am working on a FTP script to an external server. The password is set by the vendor. Let's say the password is set for 123456!.

    When I login to the server manually, the supplied userid and password work without issue.

    If I set a password variable to the assigned password, the script fails at login. In the script I have used the following:

    PASSWORKD="123456!"
    PASSWORKD='123456!'
    PASSWORKD=''123456'!''

    The few suggestions I have found online have all failed. Any help/suggestions would be appreciated.

  2. #2
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,369
    Provided Answers: 1
    My guess is you do not quote the variable when you use it e.g.

    Code:
    $ touch aabb aacc aadd
    $ x='aa*'
    $ echo $x
    aabb aacc aadd
    $ echo "$x"
    aa*

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •