From ecrist at secure-computing.net Fri Feb 1 04:57:14 2008 From: ecrist at secure-computing.net (Eric F Crist) Date: Fri Feb 1 04:57:31 2008 Subject: [X-Unix] Help with BBEdit Grep find and replace In-Reply-To: References: <20080131163254.LBU5U.180317.root@eastrmwml28> <1DA30310-5203-4EE6-99CE-6C5D555F9A50@secure-computing.net> Message-ID: <2DC1CE63-F223-4DFE-B7E5-219AC4CA9F96@secure-computing.net> I would need a few examples of what you need changed, and what you need it changed to. Eric On Jan 31, 2008, at 9:42 PM, Nick Scalise wrote: > Thanks for this help. > > The thing is, I have about 1300 files to change and each 'W3SVC1822' > field is different. > > How would I modify the script below to do that? > > > On Jan 31, 2008, at 5:23 PM, Eric F Crist wrote: > >> I forgot to mention, the sed example will create a backup of the >> files it's editing as .bak >> >> HTH >> >> On Jan 31, 2008, at 4:51 PM, Eric F Crist wrote: >> >>> you can do this really easily with a short command in sed, >>> provided this text only appears in this one place. >>> >>> sed -i ".bak" s/W3SVC1823/W3SVC1822/g >>> >>> This will replace all instances for the first argument with the >>> second argument. can contain wild cards, etc. >>> >>> If you need something more specific, just add text in both >>> arguments to make it unique. >>> >>> sed -i ".bak" s%ogFilePath2=file:///d:\Webtrendslogs\corvette >>> \e0182201\W3SVC1823\*.log%ogFilePath2=file:///d:\Webtrendslogs >>> \corvette\e0182201\W3SVC1822\*.log%g >>> >>> You'll note that I've changed the delimiter to a % instead of >>> the /, as I'm using the forward and backward slashes in the >>> matched text. >>> >>> HTH >>> >>> Eric >>> >>> >>> On Jan 31, 2008, at 3:32 PM, Nick Scalise wrote: >>> >>>> Hello, >>>> >>>> I posted to this list long ago about some help with grep and I am >>>> coming back to the well one more time as the help was excellent >>>> last time. >>>> >>>> I have some report files that need to be updated and the second >>>> line needs to be changed to be similar to the first line: >>>> >>>> ServerName=Cobra >>>> LogFilePath=file:///d:\webtrendslogs\cobra\E0182201\W3SVC1822\*.log >>>> LogFileUsername= >>>> LogFilePassword= >>>> ServerName2=Corvette >>>> LogFilePath2=file:///d:\Webtrendslogs\corvette >>>> \e0182201\W3SVC1823\*.log >>>> >>>> What I am looking for is the line that begins with LogFilePath2 >>>> to be made to be similar to the line that begins with >>>> LogFilePath. In the example above the only differences is the >>>> machine name (cobra/corvette and the w3svc182x) >>>> >>>> I want the w3svc182x number to change but not the machine name. >>>> >>>> I will be using BBEdit for this (version 8.7.2 (260)) >>>> >>>> Can anyone provide assistance for me? >>>> >>>> TIA >>>> -- >>>> Nick Scalise >>>> nickscalise@cox.net >>>> _______________________________________________ >>>> X-Unix mailing list >>>> X-Unix@listserver.themacintoshguy.com >>>> http://listserver.themacintoshguy.com/mailman/listinfo/x-unix >>> >>> ----- >>> Eric F Crist >>> Secure Computing Networks >>> >>> >>> _______________________________________________ >>> X-Unix mailing list >>> X-Unix@listserver.themacintoshguy.com >>> http://listserver.themacintoshguy.com/mailman/listinfo/x-unix >> >> ----- >> Eric F Crist >> Secure Computing Networks >> >> >> _______________________________________________ >> X-Unix mailing list >> X-Unix@listserver.themacintoshguy.com >> http://listserver.themacintoshguy.com/mailman/listinfo/x-unix > > -- > Nick Scalise > nickscalise@cox.net > > > _______________________________________________ > X-Unix mailing list > X-Unix@listserver.themacintoshguy.com > http://listserver.themacintoshguy.com/mailman/listinfo/x-unix ----- Eric F Crist Secure Computing Networks From rick at rickgordon.com Fri Feb 1 11:48:32 2008 From: rick at rickgordon.com (Rick Gordon) Date: Fri Feb 1 11:49:45 2008 Subject: [X-Unix] Help with BBEdit Grep find and replace In-Reply-To: <20080131163254.LBU5U.180317.root@eastrmwml28> References: <20080131163254.LBU5U.180317.root@eastrmwml28> Message-ID: In BBEdit, you can set the Find string to: (LogFilePath.+cobra\\[^\\]+\\)([^\\]+)(\\.*\r(?:.+\r)+?)(LogFilePath2.+corvette\\[^\\]+\\)([^\\]+)\\ Set the Replace string to: \1\2\3\4\2\\ Rick Gordon ------------------ On 1/31/08 at 4:32 PM -0500, Nick Scalise wrote in a message entitled "[X-Unix] Help with BBEdit Grep find and replace": >Hello, > >I posted to this list long ago about some help with grep and I am coming back to the well one more time as the help was excellent last time. > >I have some report files that need to be updated and the second line needs to be changed to be similar to the first line: > >ServerName=Cobra >LogFilePath=file:///d:\webtrendslogs\cobra\E0182201\W3SVC1822\*.log >LogFileUsername= >LogFilePassword= >ServerName2=Corvette >LogFilePath2=file:///d:\Webtrendslogs\corvette\e0182201\W3SVC1823\*.log > >What I am looking for is the line that begins with LogFilePath2 to be made to be similar to the line that begins with LogFilePath. In the example above the only differences is the machine name (cobra/corvette and the w3svc182x) > >I want the w3svc182x number to change but not the machine name. > >I will be using BBEdit for this (version 8.7.2 (260)) > >Can anyone provide assistance for me? > -- ___________________________________________________ RICK GORDON EMERALD VALLEY GRAPHICS AND CONSULTING ___________________________________________________ WWW: http://www.shelterpub.com From philip.robar at gmail.com Wed Feb 20 05:14:07 2008 From: philip.robar at gmail.com (Robar Philip) Date: Wed Feb 20 05:14:39 2008 Subject: [X-Unix] Looking for lc(1) source code Message-ID: <3C1AE394-067B-4EDF-BA58-C75BBCA28B79@gmail.com> lc(1) is an ls(1) like command which sorts by file type. (MKS Software ships a version with their UNIX toolkit.) I used to have the source for a free version can't find it now and I was unable to find it via Google. Does anyone out there have a pointer? Thanks Phil From alex at underwares.org Wed Feb 20 06:21:28 2008 From: alex at underwares.org (Alexandre Gauthier) Date: Wed Feb 20 06:22:13 2008 Subject: [X-Unix] Looking for lc(1) source code In-Reply-To: <3C1AE394-067B-4EDF-BA58-C75BBCA28B79@gmail.com> References: <3C1AE394-067B-4EDF-BA58-C75BBCA28B79@gmail.com> Message-ID: <47BC3768.4040508@underwares.org> Robar Philip wrote: > > lc(1) is an ls(1) like command which sorts by file type. (MKS Software > ships a version with their UNIX toolkit.) I used to have the source > for a free version can't find it now and I was unable to find it via > Google. Does anyone out there have a pointer? > > Thanks > Phil Not an immediate answer to your question but GNU ls (available through macports or fink) has this sort option: --sort=WORD extension -X, none -U, size -S, time -t, version -v, status -c, time -t, atime -u, access -u, use -u So, technically, you could use `ls -X` to accomplish that. You could alias lc to ls -laX to obtain roughly the same behaviour... Hope this helps! -- Alexandre Gauthier Network Analyst / Analyste Reseau Services Informatiques From bpm-list-osx-unix at 4321.tv Wed Feb 20 21:56:18 2008 From: bpm-list-osx-unix at 4321.tv (Brian Medley) Date: Wed Feb 20 21:56:25 2008 Subject: [X-Unix] Looking for lc(1) source code In-Reply-To: <3C1AE394-067B-4EDF-BA58-C75BBCA28B79@gmail.com> References: <3C1AE394-067B-4EDF-BA58-C75BBCA28B79@gmail.com> Message-ID: <20080221055618.GB27158@4321.tv> On Wed, Feb 20, 2008 at 05:14:07AM -0800, Robar Philip wrote: > lc(1) is an ls(1) like command which sorts by file type. (MKS Software > ships a version with their UNIX toolkit.) I used to have the source for a > free version can't find it now and I was unable to find it via Google. Does > anyone out there have a pointer? Something like this might be helpful. The character in " " is a tab. $ find . -maxdepth 1 -print0 | xargs -0 file -F " " -N | sort -k 2,2 -t " " - -- Brian Medley From sforbes42 at earthlink.net Wed Feb 20 23:31:07 2008 From: sforbes42 at earthlink.net (Scott Forbes) Date: Wed Feb 20 23:31:18 2008 Subject: [X-Unix] Looking for lc(1) source code In-Reply-To: <20080221055618.GB27158@4321.tv> References: <3C1AE394-067B-4EDF-BA58-C75BBCA28B79@gmail.com> <20080221055618.GB27158@4321.tv> Message-ID: <699FD0BE-B2EB-4D52-B99F-9520523E0D40@earthlink.net> On Feb 20, 2008, at 10:56 PM, Brian Medley wrote: > On Wed, Feb 20, 2008 at 05:14:07AM -0800, Robar Philip wrote: > >> lc(1) is an ls(1) like command which sorts by file type. (MKS >> Software >> ships a version with their UNIX toolkit.) I used to have the source >> for a >> free version can't find it now and I was unable to find it via >> Google. Does >> anyone out there have a pointer? > > Something like this might be helpful. The character in " " is a > tab. > > $ find . -maxdepth 1 -print0 | xargs -0 file -F " " -N | sort -k 2,2 > -t " " - Or in a pinch, this: function lc () { file * | sort -t: -k2 -b -f ;} From philburk at mac.com Thu Feb 21 06:03:50 2008 From: philburk at mac.com (Phillip Burk) Date: Thu Feb 21 06:04:13 2008 Subject: [X-Unix] sudo -s behavior changed in 10.5? Message-ID: This should probably be filed under the "stupid questions" section of the list but I've noticed that the behavior of sudo changed from 10.4 to 10.5. I can start a root shell session in Tiger via sudo -s and get all of the custom aliases and the custom prompt via /etc/bashrc. But in Leopard a sudo -s command resets the environment, i.e., there are no custom aliases and a generic default prompt. Not exactly conducive for my productivity as I'm rolling out more and more 10.5 clients into our client base. For the record, I'm aware that sudo -i will keep the environment as it did in Tiger but the working directory isn't maintained, it's changed to the root home. That's a PITA as well. I just want the old behavior back and I don't know how to get it. Things I've tried (lump-headed as they may have been): 1. Adding ~/.profile to /var/root. 2. Editing /etc/sudoers (it has changed from 10.4, I thought that perhaps the env_reset default option was doing it) 3. Editing /etc/profile as well as /etc/bashrc (I know, no lectures here, I'm desperate). 4. Endless amounts of googling. Any advice? Thanks. From ecrist at secure-computing.net Thu Feb 21 06:19:49 2008 From: ecrist at secure-computing.net (Eric F Crist) Date: Thu Feb 21 06:20:53 2008 Subject: [X-Unix] sudo -s behavior changed in 10.5? In-Reply-To: References: Message-ID: <7DB67073-551B-4FFF-81F7-92785F5D5420@secure-computing.net> On Feb 21, 2008, at 8:03 AM, Phillip Burk wrote: > This should probably be filed under the "stupid questions" section > of the list but I've noticed that the behavior of sudo changed from > 10.4 to 10.5. I can start a root shell session in Tiger via sudo -s > and get all of the custom aliases and the custom prompt via /etc/ > bashrc. But in Leopard a sudo -s command resets the environment, > i.e., there are no custom aliases and a generic default prompt. Not > exactly conducive for my productivity as I'm rolling out more and > more 10.5 clients into our client base. For the record, I'm aware > that sudo -i will keep the environment as it did in Tiger but the > working directory isn't maintained, it's changed to the root home. > That's a PITA as well. I just want the old behavior back and I > don't know how to get it. > > Things I've tried (lump-headed as they may have been): > > 1. Adding ~/.profile to /var/root. > 2. Editing /etc/sudoers (it has changed from 10.4, I thought that > perhaps the env_reset default option was doing it) > 3. Editing /etc/profile as well as /etc/bashrc (I know, no lectures > here, I'm desperate). > 4. Endless amounts of googling. > > Any advice? Thanks. What's always worked for me is to sudo . In my case, I use csh, so I get my environment and everything with: % sudo csh HTH ----- Eric F Crist Secure Computing Networks From philburk at mac.com Thu Feb 21 06:43:57 2008 From: philburk at mac.com (Phillip Burk) Date: Thu Feb 21 06:44:22 2008 Subject: [X-Unix] sudo -s behavior changed in 10.5? In-Reply-To: <7DB67073-551B-4FFF-81F7-92785F5D5420@secure-computing.net> References: <7DB67073-551B-4FFF-81F7-92785F5D5420@secure-computing.net> Message-ID: <93D6F0FD-7EBE-418A-B771-DF1224339F9B@mac.com> On Feb 21, 2008, at 9:19 AM, Eric F Crist wrote: > What's always worked for me is to sudo . In my > case, I use csh, so I get my environment and everything with: > > % sudo csh Sorry, I tried that too and forgot to note it. % sudo bash results in the same environment-resetting behavior. Thanks, though. From ecrist at secure-computing.net Thu Feb 21 06:47:47 2008 From: ecrist at secure-computing.net (Eric F Crist) Date: Thu Feb 21 06:48:27 2008 Subject: [X-Unix] sudo -s behavior changed in 10.5? In-Reply-To: <93D6F0FD-7EBE-418A-B771-DF1224339F9B@mac.com> References: <7DB67073-551B-4FFF-81F7-92785F5D5420@secure-computing.net> <93D6F0FD-7EBE-418A-B771-DF1224339F9B@mac.com> Message-ID: <8B98F538-4250-4238-A4A9-A6E8DCD7D48D@secure-computing.net> On Feb 21, 2008, at 8:43 AM, Phillip Burk wrote: > On Feb 21, 2008, at 9:19 AM, Eric F Crist wrote: > >> What's always worked for me is to sudo . In >> my case, I use csh, so I get my environment and everything with: >> >> % sudo csh > > Sorry, I tried that too and forgot to note it. > > % sudo bash > > results in the same environment-resetting behavior. > > Thanks, though. It may be something in your setup - it works fine for me. ----- Eric F Crist Secure Computing Networks From philburk at mac.com Thu Feb 21 07:16:55 2008 From: philburk at mac.com (Phillip Burk) Date: Thu Feb 21 07:17:25 2008 Subject: [X-Unix] sudo -s behavior changed in 10.5? In-Reply-To: <8B98F538-4250-4238-A4A9-A6E8DCD7D48D@secure-computing.net> References: <7DB67073-551B-4FFF-81F7-92785F5D5420@secure-computing.net> <93D6F0FD-7EBE-418A-B771-DF1224339F9B@mac.com> <8B98F538-4250-4238-A4A9-A6E8DCD7D48D@secure-computing.net> Message-ID: <65403921-495D-49C0-B659-E27C51239058@mac.com> On Feb 21, 2008, at 9:47 AM, Eric F Crist wrote: > It may be something in your setup - it works fine for me. OK, then, which files should I be checking? The only ones associated with the shell (bash) environment that I know of are /etc/profile, / etc/bashrc, /etc/sudoers and /etc/environment. /etc/environment doesn't exist and editing the others seems to have no effect whatsoever. It's definitely a puzzle and it affects both the imaged 10.5.2 machines at my office as well as my personal 10.5.2 Mac Book Pro that was not imaged but rather manually installed. From dledger at ivdcs.demon.co.uk Thu Feb 21 11:56:52 2008 From: dledger at ivdcs.demon.co.uk (David Ledger) Date: Thu Feb 21 14:36:25 2008 Subject: [X-Unix] sudo -s behavior changed in 10.5? In-Reply-To: <7DB67073-551B-4FFF-81F7-92785F5D5420@secure-computing.net> References: <7DB67073-551B-4FFF-81F7-92785F5D5420@secure-computing.net> Message-ID: At 08:19 -0600 21/2/08, Eric F Crist wrote: >What's always worked for me is to sudo . In my >case, I use csh, so I get my environment and everything with: > >% sudo csh I take things a stage further (I use ksh) and install somewhere on my PATH a link called -ksh to /bin/ksh (or wherever it is on that system). I can then have an alias soot='sudo -p "Password: " -H -- -ksh -o vi' When the shell starts, it sees the leading '-' of its ARGV[0] and becomes a login shell, sourcing all the normal login shell stuff. David -- David Ledger - Freelance Unix Sysadmin in the UK. HP-UX specialist of hpUG technical user group (www.hpug.org.uk) david.ledger@ivdcs.co.uk www.ivdcs.co.uk From ecrist at secure-computing.net Thu Feb 21 16:31:04 2008 From: ecrist at secure-computing.net (Eric F Crist) Date: Thu Feb 21 16:32:28 2008 Subject: [X-Unix] sudo -s behavior changed in 10.5? In-Reply-To: References: <7DB67073-551B-4FFF-81F7-92785F5D5420@secure-computing.net> Message-ID: <543305D4-4A30-45EA-B2CB-C103041106E9@secure-computing.net> On Feb 21, 2008, at 1:56 PM, David Ledger wrote: > At 08:19 -0600 21/2/08, Eric F Crist wrote: >> What's always worked for me is to sudo . In >> my case, I use csh, so I get my environment and everything with: >> >> % sudo csh > > I take things a stage further (I use ksh) and install somewhere on > my PATH a link called -ksh to /bin/ksh (or wherever it is on that > system). I can then have an alias > soot='sudo -p "Password: " -H -- -ksh -o vi' > When the shell starts, it sees the leading '-' of its ARGV[0] and > becomes a login shell, sourcing all the normal login shell stuff. Hrm, I don't understand why you've got to go to all that work. I get my _entire_ environment with my method. It may have something to do with my using my favorite shell as my login shell. Any system I've tried it on, I get my full environment. If you omit the -, you'll avoid overwriting your current environment variables, if I remember correctly. I have a custom .vimrc, .cshrc and my config in ~/.ssh, all are correctly sourced when I sudo csh as I previously indicated. ----- Eric F Crist Secure Computing Networks From dledger at ivdcs.demon.co.uk Fri Feb 22 00:47:47 2008 From: dledger at ivdcs.demon.co.uk (David Ledger) Date: Fri Feb 22 00:55:15 2008 Subject: [X-Unix] sudo -s behavior changed in 10.5? In-Reply-To: <543305D4-4A30-45EA-B2CB-C103041106E9@secure-computing.net> References: <7DB67073-551B-4FFF-81F7-92785F5D5420@secure-computing.net> <543305D4-4A30-45EA-B2CB-C103041106E9@secure-computing.net> Message-ID: At 18:31 -0600 21/2/08, Eric F Crist wrote: >Hrm, I don't understand why you've got to go to all that work. I >get my _entire_ environment with my method. It may have something >to do with my using my favorite shell as my login shell. Any system >I've tried it on, I get my full environment. If you omit the -, >you'll avoid overwriting your current environment variables, if I >remember correctly. > >I have a custom .vimrc, .cshrc and my config in ~/.ssh, all are >correctly sourced when I sudo csh as I previously indicated. I suspect my environment is more complex than yours then. I doubt the choice of shell makes any difference. I'm surprised .vimrc is relevant. The point of my method is that you _get_ root's environment, and with suitable code at the end of root's .profile you can make your own additions. Where I'm in charge of a box, I make root's .profile source a file (I call it .userprofile) in the home directory of the user that called sudo (from $SUDO_USER). I make that file a hard link to my .profile which already has sections that get skipped if root. Where I'm not in charge of the box, I add a file in root's HOME that does the same when '.' sourced. The other admins have always been happy with that and some have used it. David -- David Ledger - Freelance Unix Sysadmin in the UK. HP-UX specialist of hpUG technical user group (www.hpug.org.uk) david.ledger@ivdcs.co.uk www.ivdcs.co.uk From x-unix at listserver.themacintoshguy.com Fri Feb 22 03:55:29 2008 From: x-unix at listserver.themacintoshguy.com (x-unix@listserver.themacintoshguy.com) Date: Fri Feb 22 03:55:38 2008 Subject: [X-Unix] February 75% OFF Message-ID: <20080222135519.6508.qmail@ppp-58-9-28-222.revip2.asianet.co.th> An HTML attachment was scrubbed... URL: http://listserver.themacintoshguy.com/pipermail/x-unix/attachments/20080222/339393c2/attachment.html From philip.robar at gmail.com Fri Feb 22 17:49:25 2008 From: philip.robar at gmail.com (Robar Philip) Date: Fri Feb 22 17:49:34 2008 Subject: [X-Unix] Looking for lc(1) source code In-Reply-To: <47BC3768.4040508@underwares.org> References: <3C1AE394-067B-4EDF-BA58-C75BBCA28B79@gmail.com> <47BC3768.4040508@underwares.org> Message-ID: On Feb 20, 2008, at 6:21 AM, Alexandre Gauthier wrote: > Robar Philip wrote: >> > >> lc(1) is an ls(1) like command which sorts by file type. (MKS >> Software ships a version with their UNIX toolkit.) I used to have >> the source for a free version can't find it now and I was unable to >> find it via Google. Does anyone out there have a pointer? >> > > Not an immediate answer to your question but GNU ls (available > through macports or fink) has this sort option: > > --sort=WORD > extension -X, none -U, size -S, time -t, version -v, status -c, > time -t, atime -u, access -u, use -u > > So, technically, you could use `ls -X` to accomplish that. Thanks for the various suggestions, but none of them does what lc(1) does. I finally found the source at an HP site. (After giving up on Google and trying MS Live's search.) Phil From alex at underwares.org Fri Feb 22 18:38:12 2008 From: alex at underwares.org (Alexandre Gauthier) Date: Fri Feb 22 18:37:12 2008 Subject: [X-Unix] Looking for lc(1) source code In-Reply-To: References: <3C1AE394-067B-4EDF-BA58-C75BBCA28B79@gmail.com> <47BC3768.4040508@underwares.org> Message-ID: <47BF8714.80204@underwares.org> Robar Philip wrote: > > On Feb 20, 2008, at 6:21 AM, Alexandre Gauthier wrote: > >> Robar Philip wrote: >>> >> >>> lc(1) is an ls(1) like command which sorts by file type. (MKS >>> Software ships a version with their UNIX toolkit.) I used to have >>> the source for a free version can't find it now and I was unable to >>> find it via Google. Does anyone out there have a pointer? >>> >> >> Not an immediate answer to your question but GNU ls (available >> through macports or fink) has this sort option: >> >> --sort=WORD >> extension -X, none -U, size -S, time -t, version -v, status -c, >> time -t, atime -u, access -u, use -u >> >> So, technically, you could use `ls -X` to accomplish that. > > Thanks for the various suggestions, but none of them does what lc(1) > does. I finally found the source at an HP site. (After giving up on > Google and trying MS Live's search.) Do you mind sharing a link? Thanks :) > > Phil > > _______________________________________________ > X-Unix mailing list > X-Unix@listserver.themacintoshguy.com > http://listserver.themacintoshguy.com/mailman/listinfo/x-unix From philip.robar at gmail.com Fri Feb 22 19:21:13 2008 From: philip.robar at gmail.com (Robar Philip) Date: Fri Feb 22 19:21:23 2008 Subject: [X-Unix] Looking for lc(1) source code In-Reply-To: <47BF8714.80204@underwares.org> References: <3C1AE394-067B-4EDF-BA58-C75BBCA28B79@gmail.com> <47BC3768.4040508@underwares.org> <47BF8714.80204@underwares.org> Message-ID: On Feb 22, 2008, at 6:38 PM, Alexandre Gauthier wrote: > Robar Philip wrote: >> >> >> lc(1) is an ls(1) like command which sorts by file type. (MKS >> Software ships a version with their UNIX toolkit.) I used to have >> the source for a free version can't find it now and I was unable to >> find it via Google. Does anyone out there have a pointer? [snip] >>> Thanks for the various suggestions, but none of them does what >>> lc(1) does. I finally found the source at an HP site. (After >>> giving up on Google and trying MS Live's search.) >>> >> > Do you mind sharing a link? > Thanks :) It's actually not an HP site, it's an HP users ported source site: http://hpux.cs.utah.edu/hppd/hpux/Users/lc-1.26/ I didn't keep notes when I built it, but it's build process uses Imake (Which brought back nightmares from my days in the Windows group at Sun.) so you'll need to have X installed. Then you'll need to get rid of the HPUX define. I also spent some time bringing it into the 21st century by removing a whole bunch of ifdef's in favor of assuming things like ANSI C, POSIX, and Single UNIX Spec V3. There's a bunch more code that could be removed if the author had bothered to document things a little better. In other words you'll need to know at least a little about C and UNIX to get it to work. Phil From baltwo at san.rr.com Fri Feb 22 23:26:01 2008 From: baltwo at san.rr.com (John Baltutis) Date: Fri Feb 22 23:26:15 2008 Subject: [X-Unix] sudo -s behavior changed in 10.5? In-Reply-To: <20080223023718.19069ED1574@listserver.themacintoshguy.com> References: <20080223023718.19069ED1574@listserver.themacintoshguy.com> Message-ID: On 02/22/08, Phillip Burk wrote: > On Feb 21, 2008, at 9:47 AM, Eric F Crist wrote: > >> It may be something in your setup - it works fine for me. > > OK, then, which files should I be checking? The only ones associated > with the shell (bash) environment that I know of are /etc/profile, / > etc/bashrc, /etc/sudoers and /etc/environment. /etc/environment > doesn't exist and editing the others seems to have no effect whatsoever. > > It's definitely a puzzle and it affects both the imaged 10.5.2 > machines at my office as well as my personal 10.5.2 Mac Book Pro that > was not imaged but rather manually installed. I set up everything in ~.bash_profile (creating it, if it doesn't exist). From macmonster at myrealbox.com Sat Feb 23 01:27:48 2008 From: macmonster at myrealbox.com (Stroller) Date: Sat Feb 23 01:28:03 2008 Subject: [X-Unix] Looking for lc(1) source code In-Reply-To: References: <3C1AE394-067B-4EDF-BA58-C75BBCA28B79@gmail.com> <47BC3768.4040508@underwares.org> <47BF8714.80204@underwares.org> Message-ID: <4EDBA3AE-C151-4265-B658-25243126E52F@myrealbox.com> On 23 Feb 2008, at 03:21, Robar Philip wrote: > ... >> Do you mind sharing a link? >> Thanks :) > > ... > I didn't keep notes when I built it, but it's build process uses > Imake (Which brought back nightmares from my days in the Windows > group at Sun.) so you'll need to have X installed. Then you'll need > to get rid of the HPUX define ... > In other words you'll need to know at least a little about C and > UNIX to get it to work. Do you mind sharing a patch? Stroller. From philip.robar at gmail.com Sat Feb 23 01:50:58 2008 From: philip.robar at gmail.com (Robar Philip) Date: Sat Feb 23 01:51:11 2008 Subject: [X-Unix] sudo -s behavior changed in 10.5? In-Reply-To: References: <20080223023718.19069ED1574@listserver.themacintoshguy.com> Message-ID: <031DE73A-D440-4F33-941F-25B002470AAA@gmail.com> On Feb 22, 2008, at 11:26 PM, John Baltutis wrote: > On 02/22/08, Phillip Burk wrote: >> On Feb 21, 2008, at 9:47 AM, Eric F Crist wrote: >> >>> It may be something in your setup - it works fine for me. >> >> OK, then, which files should I be checking? The only ones associated >> with the shell (bash) environment that I know of are /etc/profile, / >> etc/bashrc, /etc/sudoers and /etc/environment. /etc/environment >> doesn't exist and editing the others seems to have no effect >> whatsoever. >> >> It's definitely a puzzle and it affects both the imaged 10.5.2 >> machines at my office as well as my personal 10.5.2 Mac Book Pro that >> was not imaged but rather manually installed. > I set up everything in ~.bash_profile (creating it, if it doesn't > exist). This is too simplistic of an answer as it ignores the distinction between login/non-login, interactive/non-interactive, and restricted shell invocations. See bash(1) for details or a good bash reference and/or tutorial. In particular see the "INVOCATION" section of the bash man page. /etc/environment is an X Window System environment variable and is not relevant to this discussion. /etc/bashrc is there for example only and I would argue that Apple reading it by default is bad form as it's documented in neither the man page nor the bash manual. (http://www.faqs.org/docs/bashman/bashref.html#SEC_Top ) Plus its being included by /etc/profile violates the separation between interactive and non-interactive shells. Looks like I need to file a bug. Phil From philip.robar at gmail.com Sat Feb 23 02:00:31 2008 From: philip.robar at gmail.com (Robar Philip) Date: Sat Feb 23 02:00:41 2008 Subject: [X-Unix] Looking for lc(1) source code In-Reply-To: <4EDBA3AE-C151-4265-B658-25243126E52F@myrealbox.com> References: <3C1AE394-067B-4EDF-BA58-C75BBCA28B79@gmail.com> <47BC3768.4040508@underwares.org> <47BF8714.80204@underwares.org> <4EDBA3AE-C151-4265-B658-25243126E52F@myrealbox.com> Message-ID: On Feb 23, 2008, at 1:27 AM, Stroller wrote: > > On 23 Feb 2008, at 03:21, Robar Philip wrote: >> ... >>> Do you mind sharing a link? >>> Thanks :) >> >> ... >> I didn't keep notes when I built it, but it's build process uses >> Imake (Which brought back nightmares from my days in the Windows >> group at Sun.) so you'll need to have X installed. Then you'll need >> to get rid of the HPUX define ... >> In other words you'll need to know at least a little about C and >> UNIX to get it to work. > > Do you mind sharing a patch? I was afraid someone would ask that. :-) I've removed so much old multi-platform cruft that a patch really wouldn't work. What I'll do in the next couple of days is finish cleaning up my version, write a simple make file (I don't know how to set up auto config.), and send it to anyone who would like a copy. Maybe I'll get really motivated and get it added to the Macports collection. Phil From jmpalaciosp at eml.cc Wed Feb 27 08:20:06 2008 From: jmpalaciosp at eml.cc (Juan Manuel Palacios) Date: Wed Feb 27 08:18:09 2008 Subject: [X-Unix] Looking for lc(1) source code In-Reply-To: References: <3C1AE394-067B-4EDF-BA58-C75BBCA28B79@gmail.com> <47BC3768.4040508@underwares.org> <47BF8714.80204@underwares.org> <4EDBA3AE-C151-4265-B658-25243126E52F@myrealbox.com> Message-ID: On Feb 23, 2008, at 5:30 AM, Robar Philip wrote: >> > I was afraid someone would ask that. :-) I've removed so much old > multi-platform cruft that a patch really wouldn't work. What I'll do > in the next couple of days is finish cleaning up my version, write a > simple make file (I don't know how to set up auto config.), and send > it to anyone who would like a copy. > > Maybe I'll get really motivated and get it added to the Macports > collection. Do let me know if you need any help with that ;-) -Juan (A.K.A. jmpp _ at _ macports.org, http://trac.macports.org/projects/macports/wiki/jmpp) From philip.robar at gmail.com Thu Feb 28 00:06:44 2008 From: philip.robar at gmail.com (Robar Philip) Date: Thu Feb 28 00:06:54 2008 Subject: [X-Unix] Looking for lc(1) source code In-Reply-To: References: <3C1AE394-067B-4EDF-BA58-C75BBCA28B79@gmail.com> <47BC3768.4040508@underwares.org> <47BF8714.80204@underwares.org> <4EDBA3AE-C151-4265-B658-25243126E52F@myrealbox.com> Message-ID: <117CFCEE-5FF3-4A61-94B6-549AC683E9CC@gmail.com> On Feb 27, 2008, at 8:20 AM, Juan Manuel Palacios wrote: > > On Feb 23, 2008, at 5:30 AM, Robar Philip wrote: >> >> >> Maybe I'll get really motivated and get it added to the Macports >> collection. > > Do let me know if you need any help with that ;-) > > -Juan (A.K.A. jmpp _ at _ macports.org, http://trac.macports.org/projects/macports/wiki/jmpp) Thanks for the offer. I've looked over the site and couldn't find any documents that tell me how to actually do the port, i.e. what file should I supply, what standard(s) should I aim for (POSIX, SUSv2, SUSv3 - this seems an especially important question as 10.4 isn't officially any version of UNIX), etc. So how do I get started? BTW, your link gives a 404 error. Thanks, Phil From philip.robar at gmail.com Thu Feb 28 00:16:12 2008 From: philip.robar at gmail.com (Robar Philip) Date: Thu Feb 28 00:16:21 2008 Subject: [X-Unix] Looking for lc(1) source code In-Reply-To: <4EDBA3AE-C151-4265-B658-25243126E52F@myrealbox.com> References: <3C1AE394-067B-4EDF-BA58-C75BBCA28B79@gmail.com> <47BC3768.4040508@underwares.org> <47BF8714.80204@underwares.org> <4EDBA3AE-C151-4265-B658-25243126E52F@myrealbox.com> Message-ID: On Feb 23, 2008, at 1:27 AM, Stroller wrote: > > On 23 Feb 2008, at 03:21, Robar Philip wrote: >> ... >>> Do you mind sharing a link? >>> Thanks :) >> I found a newer version at http://mvb.saic.com/freeware/vms94b/vmsnet/lc23.tar_z Fortunately it doesn't use Imake anymore and it's been updated to the old days of UNIX instead of the dark ages. (Its internals are also a little better documented.) I've contacted Jaun about how to go about getting it into MacPorts. Phil From choffman at eclimb.net Fri Feb 29 07:42:57 2008 From: choffman at eclimb.net (Craig Hoffman) Date: Fri Feb 29 07:43:11 2008 Subject: [X-Unix] MySQL and PhpMyAdmin Message-ID: Hi There, I have a strange problem with MySQL and PhpMyAdmin. I installed MySQL (latest version -- package install), then installed PhpMyAdmin (latest version) on a Macbook. The install went fine and everything worked. I logged in MySQL via PhpMyAdmin to change the root password. I also added the new root password to PhpMyAdmin config file. Restarted MySQL. Now PhpMyAdmin is telling me "Access denied for user "root" (using password: Yes). I've checked several times the password and its correct in both PhpMyAdmin and MySQL. What's strange is I can log into MySQL via command with the new root password and it works fine. Any thoughts? _______________________ Craig Hoffman iChat / AIM: m0untaind0g _______________________