| Author |
Message |
mike

Joined: 13 Aug 2005 Posts: 75 Location: Bowser
|
Posted: Wed 17 Aug 2005, 01:28 Post subject:
U.F.K. - unidentified flying keystroke | solved |
|
i feel real silly, but there's been something really bothering me lately.
my present computer is the only computer i've ever spent any real time on, being relatively new to this whole technology thing
well...
here goes
| Code: | | set | grep <regexp> |
now, you notice that symbol after the set, but before the grep? what in the name of hell is that? I've examined my keyboard (with both eyes open, and i'm dead sober!) numerous time, and I can't seem to find this symbol anywhere. I'm finding reference to this symbol all over the internet, and it's kind of effecting my abaility to learn commands.
if someone could please email me a copy, that would be wonderfull.
(No, really, I don't have that symbol! is anyone else missing it?)
Last edited by mike on Wed 17 Aug 2005, 02:05; edited 1 time in total
|
|
Back to top
|
|
 |
dvw86

Joined: 04 May 2005 Posts: 636 Location: Washington State
|
Posted: Wed 17 Aug 2005, 01:47 Post subject:
|
|
Don't feel silly. Hold down the shift key and press the backslash "\". You should then see it.
|
|
Back to top
|
|
 |
Bruce B

Joined: 18 May 2005 Posts: 10817 Location: The Peoples Republic of California
|
Posted: Wed 17 Aug 2005, 01:47 Post subject:
|
|
It's a pipe Mike. That's what I call it a pipe.
Maybe on the same key as the backslash
|
|
Back to top
|
|
 |
mike

Joined: 13 Aug 2005 Posts: 75 Location: Bowser
|
Posted: Wed 17 Aug 2005, 02:01 Post subject:
|
|
well, i do feel silly, but now at least I know, lol.
thanks for your help dvw86 & Bruce B
|
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15109 Location: Paradox Realm
|
Posted: Wed 17 Aug 2005, 02:02 Post subject:
|
|
Pah I only learnt by making a complete fool of my self . . .
for example
Isn't a double ||
used as a rem statement in bash?
and
# at the beginning of a line?
rem = REM or remark (part of a program not run)
for example */ not run in C */
' do not run this line in some basics
REM Not run this line in olde type Basics
\\ Not run in Curl
(not run in RosASM - assembler)
<-- Not run in HTML -->
LOL and I can not remember how it is done in Pascal or Tcl?
Wonder if I got any of that right?
_________________ Puppy WIKI
|
|
Back to top
|
|
 |
Bruce B

Joined: 18 May 2005 Posts: 10817 Location: The Peoples Republic of California
|
Posted: Wed 17 Aug 2005, 02:08 Post subject:
Use of set, pipe (|), grep, redirect (>) commands |
|
Mike it is simple to explain and imperative that you understand what a pipe is.
--------------
# set
outputs to the screen contents of your environment, bash aliaes and etc.
# set |
tells the system to pipe the output somewhere else and not to standandard output which is your monitor
# set | grep
instructs to send the output of set to the command grep. this make set the input for grep
# set | grep <regexpr>
is saying that you need to fill in content of <regexpr>
--------
Now practice:
# set
note the output of set
# set | grep LOGNAME
will display only the lines that have the uppercase string LOGNAME in it
# set | grep EDITOR
will display only the lines that have the uppercase string EDITOR in it
-----------------
Might as well bring up redirect at this point.
# set | grep EDITOR>editor$
this will direct the previous command to output by redirection to a file.
when you run the command you won't see a thing because standard output has been instructed to output to a file.
To view the contents of the newly created file as standard output, do this
# cat editor$
The $ doesn't mean anything, I used it because the > redirect will overwrite an existing file if the name is the same. Chances are you don't have a file called editor$ so it is safe bet it won't damage things by an overwrite.
Then remove the file
# rm editor$
|
|
Back to top
|
|
 |
mike

Joined: 13 Aug 2005 Posts: 75 Location: Bowser
|
Posted: Wed 17 Aug 2005, 02:26 Post subject:
|
|
Bruce B, thanks alot for that. i'm slowly and painfully working my way through the wonderfull rute guide http://www.icon.co.za/~psheer/book/index.html.gz that i was pointed to in the sticky -
great excercises in there,
and i find that i'm learning a lot here in the puppy forums as well - as my experience level increases, the more I realize what a wealth of information is stored here in the kennels
cheers
|
|
Back to top
|
|
 |
|