LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-30-2008, 09:56 AM   #1
cmfarley19
Member
 
Registered: Nov 2002
Location: Central VA
Distribution: Ubuntu/Debian
Posts: 228

Rep: Reputation: 32
Bash Script and the '&'


Hi All,
I should know this but am drawing a complete blank.
I have a simple script that I want to run to automatically log our server into or network and firewall.
The firewall log in script look like this:
Code:
#! /bin/bash

lynx -dump -auth=username:password&03 www.google.com
The password is "password&03". We have to change our passwords every 90 days and the new password must be different than our last 24. Yes, our last 24. So I just use the same password and increment a number at the end.
Anyway...
That script chokes on the '&' in my password. I can not figure out how to properly escape that character so bash will pass the full password to the script.

Any thoughts?

Chris
 
Old 05-30-2008, 10:21 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
\& will do it. or put it all in single quotes.
 
  


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
Does anyone know of a bash script can search & replace txt in a file. jimwelc Linux - Newbie 6 09-15-2008 12:13 AM
Howto Encrypt & Run Bash script File nabeeliumattack Linux - General 7 05-17-2008 04:58 PM
bash script extract name transfer & to right folder gizmo1007 Programming 2 12-15-2007 05:12 AM
bash script & cron probs. skubik Programming 17 10-16-2005 02:00 PM
bash script - variables & arrays question rblampain Linux - Software 4 09-25-2004 09:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:58 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