From: "Paul Kraus" <pkraus@pelsupply.com>
To: linux-newbie@vger.kernel.org
Subject: FW: Perl
Date: Wed, 4 Dec 2002 13:27:28 -0500 [thread overview]
Message-ID: <01a701c29bc2$cd5a19b0$64fea8c0@pkrausxp> (raw)
Its perl hence the subject :)
$5 is the 5th memory of a regular expression. The second statement then
uses a regular expression to replace " " with "\ " to correct paths.
$5=Somefolder/some secondfolder
$path would get Somefolder/some\ secondfolder.
I want to condsense this into one statement. I am probably off topic
here but I have seen others post about basic programming issues.
Thanks,
Paul
-----Original Message-----
From: linux-newbie-owner@vger.kernel.org
[mailto:linux-newbie-owner@vger.kernel.org] On Behalf Of ichi@ihug.co.nz
Sent: Thursday, December 05, 2002 1:56 AM
To: Paul Kraus
Cc: linux-newbie@vger.kernel.org
Subject: Re: Perl
Paul Kraus wrote:
>
> 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 majordomo@vger.kernel.org More majordomo
info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
next reply other threads:[~2002-12-04 18:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-04 18:27 Paul Kraus [this message]
2002-12-04 19:33 ` FW: Perl Ray Olszewski
[not found] ` <01bb01c29bcd$3eba1a60$64fea8c0@pkrausxp>
2002-12-04 20:03 ` Ray Olszewski
-- strict thread matches above, loose matches on Subject: below --
2002-12-04 19:42 Paul Kraus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='01a701c29bc2$cd5a19b0$64fea8c0@pkrausxp' \
--to=pkraus@pelsupply.com \
--cc=linux-newbie@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox