Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Search Forums > Search Results

Showing results 1 to 50 of 364
Search: Posts Made By: Paul McCann
Thread Thread Starter Last Post Replies Views Forum
If you're not completely attached to something... 1,214 Views / 21 Replies  
If you're not completely attached to something like xterm-color as your TERMINAL setting then changing that to, say, vt100 will do the trick of saving the output from commands such as man or top.
...
Posted by Paul McCann, on Jul 14, 2005 at 09:33 PM, in macOS
It's worth trying the following: set your own... 1,489 Views / 3 Replies  
It's worth trying the following: set your own display to be something like ":0.0". If you're using tcsh then
setenv DISPLAY :0.0
will work, while export DISPLAY=:0.0 will work for bash or zsh....
Posted by Paul McCann, on Apr 20, 2005 at 12:04 AM, in macOS
Errr, yeeeeeees: I guess this could conceivably... 1,085 Views / 12 Replies  
Errr, yeeeeeees: I guess this could conceivably be useful if you had several versions of a particular application. But otherwise I'll stick to "open -a console" over "open -a...
Posted by Paul McCann, on Nov 24, 2004 at 09:36 PM, in macOS
Sure: just change your TERM environment variable... 1,085 Views / 12 Replies  
Sure: just change your TERM environment variable on the remote machine. For example, if you're using tcsh on the remote box add the line

setenv TERM vt100

to the file .login on the remote...
Posted by Paul McCann, on Nov 19, 2004 at 11:38 PM, in macOS
To open the application you need the "-a" ... 1,085 Views / 12 Replies  
To open the application you need the "-a"

open -a clock

open -a terminal

( case is irrelevant ). To open a finder window at the current working directory use

open .
Posted by Paul McCann, on Nov 17, 2004 at 12:00 AM, in macOS
You're more than welcome: good to hear things are... 6,094 Views / 5 Replies  
You're more than welcome: good to hear things are up and running.

Paul
Posted by Paul McCann, on Oct 20, 2004 at 03:47 AM, in macOS
Re: Can't open display! 6,094 Views / 5 Replies  
Try setting your display *locally* (ie on your mac) using

setenv DISPLAY :0.0

(if you're using tcsh) or

export DISPLAY=:0.0

(if you're using bash or zsh). Then connect to the foreign...
Posted by Paul McCann, on Oct 19, 2004 at 11:39 PM, in macOS
Re: Where do local Perl modules go? 1,027 Views / 7 Replies  
I'm not sure, but I wonder whether you're slightly misunderstanding
the advice. If you install modules they'll go into a site-perl directory (relative to your current perl installation), and this...
Posted by Paul McCann, on Sep 30, 2004 at 10:45 PM, in macOS
[QUOTE]Originally posted by Switched2Mac: I... 643 Views / 5 Replies  
[QUOTE]Originally posted by Switched2Mac:
I found the perl executable in /usr/bin.

Why are there two locations for perl in OSX?

Not sure what you mean here: for the binary? For the modules?
...
Posted by Paul McCann, on May 17, 2004 at 10:19 PM, in macOS
perl -V will show you what you're after:... 643 Views / 5 Replies  
perl -V

will show you what you're after: 5.8.1 core modules are in /System/Library/Perl/5.8.1 and user installed stuff will be in /Library/Perl/5.8.1 (There are subdirectories in each location...
Posted by Paul McCann, on May 13, 2004 at 04:14 AM, in macOS
Re: carriage return/newline to space delineated 650 Views / 3 Replies  
In the find field enter

[^>]\r[^<]

and in the replace field just throw in a space. Select "use grep" and you should get
what you're after (assuming there's no leading spaces on the lines in...
Posted by Paul McCann, on Apr 1, 2004 at 08:41 PM, in macOS
Just a quick clarification of the points above... 14,176 Views / 37 Replies  
Just a quick clarification of the points above (re installing 10.2+ on a slot-loading iMac without first updating the firmware): it's not only *installing* 10.2+ on such a machine that can cause the...
Posted by Paul McCann, on Mar 14, 2004 at 07:24 PM, in Mac Desktops
Re: CPAN Install Directory 469 Views / 2 Replies  
The modules that end up there involve a compiled portion: that is, they're dependent on local details of your perl (how it was compiled, what sort of architecture it's running on and so forth), and...
Posted by Paul McCann, on Mar 4, 2004 at 01:55 AM, in macOS
One thing to watch here is that the key you poke... 587 Views / 3 Replies  
One thing to watch here is that the key you poke in .ssh/authorized_keys is actually a **single line**, and not chopped up into multiple lines. That snags quite a few people.

Easiest to just do...
Posted by Paul McCann, on Mar 2, 2004 at 01:58 AM, in macOS
Re: Stop Terminal From Clearing Previous Output 686 Views / 4 Replies  
One way is to change your TERM environment variable from "xterm-color" to "vt100".
The vt100 setting isn't too bad, so not much is lost. So if you're using bash or zsh just

export TERM=vt100
...
Posted by Paul McCann, on Feb 18, 2004 at 01:27 AM, in macOS
Re: Re: How find a "hidden" file? 704 Views / 9 Replies  
You do know about "locate" I hope. For files that aren't constantly popping in and out of existence (such as any system files, and in fact the *vast* majority of files on your system) there's a nice...
Posted by Paul McCann, on Feb 12, 2004 at 08:01 PM, in macOS
OK, if I'm understanding you correctly, the... 588 Views / 3 Replies  
OK, if I'm understanding you correctly, the following should make all the email addresses it trips across into the generic [email protected]

perl -pi.bak -e...
Posted by Paul McCann, on Jan 20, 2004 at 08:57 PM, in macOS
Re: Emacs regexp 588 Views / 3 Replies  
Umm, it might help if you let us know the format of the email addresses! That is, give us a sample email address: what it currently is and what you'd like it to be. Be as precise as you can and I'm...
Posted by Paul McCann, on Jan 20, 2004 at 01:37 AM, in macOS
If you're using tcsh as your shell on the... 565 Views / 4 Replies  
If you're using tcsh as your shell on the "foreign" system just add the following line to your .cshrc file on the remote machine. (Create it if necessary. Also note that if there's a file called...
Posted by Paul McCann, on Dec 28, 2003 at 10:07 PM, in macOS
Sory johnMG: not even close. I'm no slouch with... 1,026 Views / 25 Replies  
Sory johnMG: not even close. I'm no slouch with vim, and my regex skills are reasonably good, but if synchronization matures there's absolutely no contest. Think, for example, about the situation in...
Posted by Paul McCann, on Dec 19, 2003 at 11:02 PM, in macOS
Gerben Wierda's "i-installer" makes installing... 1,026 Views / 25 Replies  
Gerben Wierda's "i-installer" makes installing the base TeX distribution pretty trivial (as long your pipes are reasonably fat!). Easy instructions are available at Richard Koch's TeXShop page:
...
Posted by Paul McCann, on Dec 18, 2003 at 11:47 PM, in macOS
One common problem with CPAN is that your FTP... 569 Views / 7 Replies  
One common problem with CPAN is that your FTP transfers may not be happening in passive mode, and thus they might be blocked by a firewall. If you haven't already I'd recommend setting the...
Posted by Paul McCann, on Dec 2, 2003 at 07:38 PM, in macOS
Hmm, you still need to feed it arguments somehow... 3,183 Views / 5 Replies  
Hmm, you still need to feed it arguments somehow I suppose. Maybe something like the freeware Pashua would do what you're after. (See www.versiontracker.com and search for Pashua: it's a really nice...
Posted by Paul McCann, on Nov 28, 2003 at 09:18 AM, in macOS
Re: Panther and Authoxy? 711 Views / 3 Replies  
I haven't used authoxy on Panther; several months ago I switched to squid to "proxy my proxy" and never looked back. The big advantage squid had then was handling https sites, though authoxy...
Posted by Paul McCann, on Nov 20, 2003 at 10:47 PM, in macOS
killall on solaris 4,908 Views / 57 Replies  
It's one of those delightful differences that sysadmins grow to *hate*. On solaris...

---
NAME
killall - kill all active processes

SYNOPSIS
/usr/sbin/killall [ signal ]
---
Posted by Paul McCann, on Oct 14, 2003 at 04:05 AM, in macOS
While I've never upgraded to iKey I do still have... 499 Views / 5 Replies  
While I've never upgraded to iKey I do still have "Youpi Key" lying around fallow. I made a new item of type "run unix commands" and entered the following command:

/usr/bin/pbpaste | /usr/bin/fmt...
Posted by Paul McCann, on Oct 7, 2003 at 08:58 PM, in macOS
Re: Re: Re: Re: unix guru help 672 Views / 6 Replies  
Yes indeed: thanks for the correction. One day I'll remember that people really do use spaces in filenames.

Cheers,
Paul
Posted by Paul McCann, on Sep 25, 2003 at 09:36 PM, in macOS
Re: Re: unix guru help 672 Views / 6 Replies  
Here's a simple approach that works OK on my tests. (Standard warning: check it out on a sample directory first!) It just uses some of the inbuilt goodness of zsh. At a terminal prompt ( % ) enter:
...
Posted by Paul McCann, on Sep 23, 2003 at 03:35 AM, in macOS
Re: "ls" command question? 879 Views / 13 Replies  
rs is a cool little utility that I knew nothing about: thanks for the pointer. While a bare "rs 0 2" won't do the trick if you use

ls | rs -c 0 2

the output looks OK to me. That causes the...
Posted by Paul McCann, on Sep 18, 2003 at 09:17 PM, in macOS
Re: Re: Re: "ls" command question? 879 Views / 13 Replies  
Gack: thanks for the kick in the arse. What I vomited forth should have looked like

ls | perl -ne 'chomp;chomp($b=<>);printf "%-30s %-30s\n", $_,$b'

which has the virtue of actually printing...
Posted by Paul McCann, on Sep 18, 2003 at 12:26 AM, in macOS
Re: I Need To Connect To A Unix Machine 486 Views / 1 Replies  
/Applications/Utilities/Terminal.app

Works fine: to connect to your school machine you should be using something like

ssh [email protected]

where username is your username...
Posted by Paul McCann, on Sep 17, 2003 at 02:59 AM, in macOS
Re: "ls" command question? 879 Views / 13 Replies  
Umm, maybe you *can't*. That is, it's probably not a built in. The available options look to be a single column (default when used into a pipe) or the multicolumn output that's used where the result...
Posted by Paul McCann, on Sep 17, 2003 at 01:25 AM, in macOS
Re: do shell script error 478 Views / 1 Replies  
Dunno if this is causing your difficulty, but one difference is the PATH (and other environment variables) in the two cases. In "do shell script" you get a totally stupid PATH set for you (including...
Posted by Paul McCann, on Sep 1, 2003 at 07:15 PM, in macOS
Welcome to the hideous world of tcsh quoting. Not... 668 Views / 5 Replies  
Welcome to the hideous world of tcsh quoting. Not a nice place to land. Maybe this will help you out...

alias psf 'ps -auxww | grep \!:1 | grep -v grep | awk '\\''{print $2}'\\'' '

(Yep, *lots*...
Posted by Paul McCann, on Aug 31, 2003 at 03:41 AM, in macOS
Re: Re: Re: shell programming: sed filter and \n 675 Views / 7 Replies  
Yes, yes, "intercepts a backslash" is what I *thought* had been typed (cf the doubled backslash in my working (per)version). Good to know that there are some sensible ways of doing this, and thanks...
Posted by Paul McCann, on Aug 17, 2003 at 10:58 PM, in macOS
Re: Re: Re: Re: perl expression matching 578 Views / 4 Replies  
Hi Gary,

I have a sneaking suspicion that this is one of those things that might have changed over time: at least, I remember there being *talk* of the default behaviour being changed.

My...
Posted by Paul McCann, on Aug 17, 2003 at 10:53 PM, in macOS
Re: Re: perl expression matching 578 Views / 4 Replies  
So if you want to use this as a one-liner --supposing you've got a file "filename" full of lines that might match-- then something like


perl -ne 'print "$1\n" if...
Posted by Paul McCann, on Aug 17, 2003 at 09:45 PM, in macOS
Re: shell programming: sed filter and \n 675 Views / 7 Replies  
Yuck! sed is 'orrible. That "sed", let's try and solve your problem. When substituting the newline you need to escape a *literal* newline.

That is, if "meme" contained your data you might expect...
Posted by Paul McCann, on Aug 17, 2003 at 09:31 PM, in macOS
Sorry for the slow reply (and good to hear that... 3,543 Views / 18 Replies  
Sorry for the slow reply (and good to hear that you're giving zsh a try; it's a bit of an effort to get things set up how you want, but smooth sailing once you're there).

I was going to write an...
Posted by Paul McCann, on Aug 12, 2003 at 09:13 PM, in macOS
Possibly: tcsh runs out of puff eventually. I... 3,543 Views / 18 Replies  
Possibly: tcsh runs out of puff eventually. I seem to remember the poster mentioning elsewhere that there might be 10000 files involved. Here it's 3500. In any case, if you try something like

%...
Posted by Paul McCann, on Aug 8, 2003 at 07:18 AM, in macOS
Re: Psync problem 535 Views / 2 Replies  
I'm a psync user too, and know the symptoms that you're talking about. Every so often there's a directory that refuses to die. I think there are a couple of possible causes of this behaviour.

(1)...
Posted by Paul McCann, on Aug 5, 2003 at 08:38 PM, in macOS
You might run into a bit of trouble using Neil's... 3,543 Views / 18 Replies  
You might run into a bit of trouble using Neil's solution because the shell tends to barf when fed a long file list. Here's an adaptation of what he wrote above that should get around the problem....
Posted by Paul McCann, on Aug 5, 2003 at 05:22 AM, in macOS
Thanks for the 'format' reminder. It's been many... 720 Views / 10 Replies  
Thanks for the 'format' reminder. It's been many a long year since I used "write" in this way, and I'd forgotten how useful it can be. Anyone looking to make multipage reports in good old ascii...
Posted by Paul McCann, on Aug 4, 2003 at 01:50 AM, in macOS
Maybe the zeros and ones are backwards in this... 931 Views / 5 Replies  
Maybe the zeros and ones are backwards in this discussion (and the option to "test"), or am I missing something? According to my "man test" the -n flag is for *string* tests; you need -s for file...
Posted by Paul McCann, on Aug 1, 2003 at 08:00 AM, in macOS
Re: Re: Re: Any 1337 Perl guys around? 720 Views / 10 Replies  
Nice to know! You're right, useful little worms pop out of the woodwork every now and then: Perl seems to have more nooks and crannies than most languages, which seems to generate sneers from...
Posted by Paul McCann, on Jul 30, 2003 at 08:03 AM, in macOS
Umm, I think you've missed the bit about the... 720 Views / 10 Replies  
Umm, I think you've missed the bit about the output having to be centred (or as near as possible to centred) within a ten character "column". That's what I'm calculating above. The -10%s printf...
Posted by Paul McCann, on Jul 29, 2003 at 08:08 PM, in macOS
Re: Any 1337 Perl guys around? 720 Views / 10 Replies  
Err, nup to the l337 claim, but maybe this will get you started toward what you're after. If you save it as, say, "table.pl" in your ~/bin directory, and "chmod u+x ~/bin/table.pl", then "rehash",...
Posted by Paul McCann, on Jul 29, 2003 at 12:52 AM, in macOS
Learning regexes will always hold you in good... 758 Views / 9 Replies  
Learning regexes will always hold you in good stead, whether you end up applying them in grep, awk, perl, python, sed or any of the myriad other apps that now embed the capability to munge text in...
Posted by Paul McCann, on Jul 20, 2003 at 11:12 PM, in macOS
Give this a go: perl -pi.bak -e '$a=<> if... 758 Views / 9 Replies  
Give this a go:

perl -pi.bak -e '$a=<> if /^[A-Z]\./' filename

where filename is your set of questions. Original is in filename.bak should it all go horribly wrong!

Cheers,
Paul
Posted by Paul McCann, on Jul 20, 2003 at 03:55 AM, in macOS
I'm guessing that the problem witnessed above is... 781 Views / 8 Replies  
I'm guessing that the problem witnessed above is due to the fact that tcsh
isn't seeing the colon as anything but part of the variable name. You need to
delimit the variable name with (eg)...
Posted by Paul McCann, on Jul 7, 2003 at 09:59 PM, in macOS
Showing results 1 to 50 of 364
 
Top
Privacy Policy
All times are GMT -4. The time now is 01:55 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,