The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   UNIX - Newcomers (http://hintsforums.macworld.com/forumdisplay.php?f=15)
-   -   Baby beginner question about "w" command (http://hintsforums.macworld.com/showthread.php?t=4627)

nkuvu 08-11-2002 02:06 PM

Hint on the FiMs~

This is a collection of options, not a single option. So I sincerely doubt you'd be able to find anything by looking for the full word.

:)

vickishome 08-11-2002 02:51 PM

Farting gnat! LOL! :D

No skeet shooting over here. I may feel like shooting the terminal, shooting my books and shooting my kids if they won't stop fighting while I'm trying to digest all of this (just kidding on the kids, of course), but no skeet shooting. Believe it or not, I'm actually enjoying this no matter how much hair I might end up with in the end. :)

1. I'm getting "pattern not found" with /shlvl. But if I do a "Find" in the terminal, it's there. And if I do a "Find" while in ManOpen, it's there too. My logic is now on tilt. :confused:

2. I follow the logic (so I think). I follow the numbers. I have no clue what you've displayed there. I've seen that info before (or something similar), but am not comprehending it. But it's the example that's important, not the details of the example, right?

3. Okee-dokee. There's always another day.

4. Done. :)

5. Gotta problem. In the current shell I'm in (ttyp1), % man tcsh spits out lots of cool info. But I opened a new shell (new window - ttyp2), and suddenly % man tcsh isn't too happy (methinks the setenv commands are in affect in the new shell):
Code:

[1:16pm] [vicki] [~] Exit, and we all die: % man tcsh
man: Formatting manual page...
There is no -F option ("less --help" for help)

And so, of course, % less --help only serves to spit out the same error message and is rendered useless.

However, I do still have ttyp1 open. FiMs~ means (-i) ignore case (-M) long prompt (more verbose) (-s) squeeze blank lines and (~) make lines at EOF blank.

I ran across "F" without a dash (scroll forward), making me think that's what was intended, but I don't know why I'm having problems with -FiMs~. I tried F -iMs~, but, of course, that produces an error.

mervTormel 08-11-2002 03:32 PM

regrets. my less is fink's less which is more than OSX's less.

re: 1 & 5. with fink's less (same author, newer version) the -F switch...
Quote:

-F or --quit-if-one-screen
Causes less to automatically exit if the entire
file can be displayed on the first screen.
Code:

$ which less
/sw/bin/less

$ less -V
less 358
Copyright (C) 2000 Mark Nudelman
...

$ whereis less
/usr/bin/less

$ /usr/bin/less -V  # here, env var LESS=-F breaks /usr/bin/less
There is no -F option ("less --help" for help)

$ echo $LESS
-FiMs~

$ LESS=-iMs~  # fix env var LESS, remove the F

$ /usr/bin/less -V
less 340
Copyright (C) 1999 Mark Nudelman
...

since your env variable LESS has -F in it, it gaks /usr/bin/less and breaks all the rest of the switch values, which means you don't get case-blind searches (-i) and /shlvl will fail to find anything.

/SHLVL would find it, right?

so, remove the F from the LESS varliable and restart your shells (to re-initialize your shell environment). grokking now?

re: 2. consult % man ps

get familiar with ps output - ps wwaxl - all processes have a process ID (PID) and a parent PID (PPID)

my example merely climbed up the parent tree from a bash shell process, whose parent is terminal whose parent is windowserver whose parent is init whose parent is kernel.


re: fink vs. vanilla OSX, i will try to remain OSX vanilla with commands so as not to stuff up these issues.

vickishome 08-11-2002 06:43 PM

It must have been all of those farting gnats that made ya do it. :p

And good news. By golly, I think I understood all of your last message! :D

While I had the F flag in my env for less, neither /shlvl or /SHLVL would work. I errored out before I even got the chance to try.

Now that I have it corrected, both work as advertised. :)

I've just gone back to read this thread again, and I'm beginning to grok it. :D In the processes you were showing me, the relationships are kernal to WindowServer to Terminal to whatever bash is (a process you're running). Yeah, I know you spelled it out for me. I wanted to spell it myself. ;) So if I want to see what's called what, I start by looking up the PPID for the process to see who's its parent. I can look up that PPID to find its parent. And so on and so forth until I finally reach the kernal.

AND this means I can look to see if a process I'm running has called another process (related) or is just another process running along side of it (unrelated). Right?

BTW, nkuvu, I'm not ignoring you. I appreciate your help and have been reading and learning from your help as well. Thanks. :)


All times are GMT -5. The time now is 10:31 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.