Skip to contentSkip to conversation

Perl

DISCUSSION Paul Kraus 2 participants 2 messages Dec 4, 2002 – Dec 5, 2002

lore
Share & tools
lore

Paul Kraus

author
#0 lore raw

How can I make this assignment in one statement. I know its going to be something easy.
$path=$5;
$path=~s/ /\\ /g;

Paul Kraus
Network Administrator
PEL Supply Company
216.267.5775 Voice
216-267-6176 Fax
www.pelsupply.com

BEGIN:VCARD
VERSION:2.1
N:Kraus;Paul
FN:Paul Kraus ([email protected])
ORG:PEL Supply Company
TITLE:Network Administrator
TEL;WORK;VOICE:(216) 267-5775
TEL;CELL;VOICE:(216) 410-5526
TEL;WORK;FAX:(216) 267-6176
ADR;WORK:;;4666 Manufacturing Road;Cleveland;Ohio;44135;United States of America LABEL;WORK;ENCODING=QUOTED-PRINTABLE:4666 Manufacturing Road=0D=0ACleveland, Ohio 44135=0D=0AUnited States of Ame= rica
ADR;HOME:;;;;;;United States
LABEL;HOME:United States
URL;WORK:http://www.pelsupply.com
EMAIL;PREF;INTERNET:[email protected]
REV:20020416T182124Z
END:VCARD

#1 lore raw
Quoted 5 lines · Paul Kraus

How can I make this assignment in one statement.
I know its going to be something easy.
$path=$5;
$path=~s/ /\\ /g;

I don't understand. Is this part of a bash script? It looks like you a trying to assign the fifth parameter (path=$5) to a variable named path (which BTW is not the PATH) and then manipulate it in some way (something to do with \ I think).

Perhaps this is some language that I am unfamiliar with? If so, I apologize. However, if is bash, I suggest you explain in words what you want to do, and I will try to script it.

Cheers,
Steven

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs