Mailinglist Archive: opensuse (2430 mails)
| < Previous | Next > |
Re: [opensuse] BASH - brain teaser, can it be done without a pipe?
- From: Randall R Schulz <rschulz@xxxxxxxxx>
- Date: Wed, 23 Apr 2008 16:11:50 -0700
- Message-id: <200804231611.50630.rschulz@xxxxxxxxx>
On Wednesday 23 April 2008 12:50, Greg Freemyer wrote:
Type these characters at a shell prompt (omitting the surrounding quotes):
"man bash<ENTER>/<<<<ENTER>"
Oh, my that's a bit ambiguous. After the slash, type three less-than's
and hit ENTER.
Here's what you'll see:
-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
Here Strings
A variant of here documents, the format is:
<<<word
The word is expanded and supplied to the command on its standard input.
-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
The immediately preceding section is about "here documents" and is very
good for shell programmers to know about.
Randall Schulz
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
sed -e 's/\.//' <<< "$t"
What is <<< ?
I know < and <<, but the above does not look like a typo.
Greg
Type these characters at a shell prompt (omitting the surrounding quotes):
"man bash<ENTER>/<<<<ENTER>"
Oh, my that's a bit ambiguous. After the slash, type three less-than's
and hit ENTER.
Here's what you'll see:
-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
Here Strings
A variant of here documents, the format is:
<<<word
The word is expanded and supplied to the command on its standard input.
-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
The immediately preceding section is about "here documents" and is very
good for shell programmers to know about.
Randall Schulz
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
| < Previous | Next > |