UNIXing with Windows
#1
FlyerTalk Evangelist
Original Poster
Join Date: Nov 2002
Location: Freeload Univ. Where are you sitting?
Posts: 14,818
UNIXing with Windows
OK - this is probably all old hat to the gurus here, but -
As I was fooling around with the hosts file, it got to be somewhat clumsy because the files tend to be rather large. I found myself wishing I had some of the neat UNIX tools for handling text stuff. Then I remembered at one time I had got hold of a number of the -NIX utilities that had been converted to DOS.
I still had them available, so I stuffed a few of them in the system32 folder (since it was already on the path). Even though they were converted to good old 16-bit DOS, a lot of them still work fine. So far, grep, wc, and find seem to work fine.
As time goes on, I imagine I will find more of them that work - I really missed grep - from the command line, it's a lot easier than going through menus, etc.
Well, that is all.
As I was fooling around with the hosts file, it got to be somewhat clumsy because the files tend to be rather large. I found myself wishing I had some of the neat UNIX tools for handling text stuff. Then I remembered at one time I had got hold of a number of the -NIX utilities that had been converted to DOS.
I still had them available, so I stuffed a few of them in the system32 folder (since it was already on the path). Even though they were converted to good old 16-bit DOS, a lot of them still work fine. So far, grep, wc, and find seem to work fine.
As time goes on, I imagine I will find more of them that work - I really missed grep - from the command line, it's a lot easier than going through menus, etc.
Well, that is all.
#3
FlyerTalk Evangelist
Original Poster
Join Date: Nov 2002
Location: Freeload Univ. Where are you sitting?
Posts: 14,818
Oh yeah - I'm sure there's lots of stuff. But what I had on hand was just that - stuff I had on hand. No installation, no .dll's, no hassles. Just copied them in and they worked.
Since they were compiled for 16-bit DOS, I was really surprised so many of them actually worked.
Gawd - I remember downloading them (28.8 modem) about 20 years ago. Plus ca change, plus ca la meme chose.
Since they were compiled for 16-bit DOS, I was really surprised so many of them actually worked.
Gawd - I remember downloading them (28.8 modem) about 20 years ago. Plus ca change, plus ca la meme chose.
#4
 
Join Date: Nov 2000
Location: Upcountry Maui, HI
Posts: 13,315
www.cygwin.com
It has everything you want including the shells, ssh etc and config files in their natural places.
-David
It has everything you want including the shells, ssh etc and config files in their natural places.
-David
Last edited by LIH Prem; Feb 28, 2015 at 6:45 am
#5
Join Date: Dec 2009
Location: RDU
Programs: DL DM+(segs)/MM, UA Ag, Hilton DM, Marriott Ti (life Pt), TSA Opt-out Platinum
Posts: 3,228
www.cygwin.com
It has everything you want including the shells, ssh etc and config files in their natural places.
-David
It has everything you want including the shells, ssh etc and config files in their natural places.
-David
#7
Join Date: Jan 2003
Location: Manchester, United Kingdom
Programs: Hilton Gold, Priority Club Blue, SPG Gold, Sofitel Gold, FB Ivory, BA Blue
Posts: 8,481
Back in the 90s, I was making good use of awk, sed, grep and so on, for Windows. These days? Oracle Virtualbox + Linux VM. I wish Microsoft would implement all these tools natively, for Windows (a terrible OS for text processing, but with qualities of its own).
#8
Join Date: Nov 2007
Location: HNL
Programs: UA Premier 1K
Posts: 296
Another vote for Cygwin - it is also easy to keep up to date!
Relevant: http://lifehacker.com/362316/use-uni...command-prompt
Relevant: http://lifehacker.com/362316/use-uni...command-prompt
#9
FlyerTalk Evangelist
Original Poster
Join Date: Nov 2002
Location: Freeload Univ. Where are you sitting?
Posts: 14,818
Thanks for the suggestions, guys.
I was looking for some stuff in my hosts file (see another thread) and thinking that this would be a lot easier if I could just grep, cut, sort, wc, etc. like I do under Unix. Then I thought of that stuff I had on hand, and tried it out, and it worked! (As long as I wasn't trying to dick around with the file system).
But, as others have pointed out, code written specifically to work under Windows would be a much better solution. Still, when you're in a hurry, any car will do, rather than holding out for the limo.
I was looking for some stuff in my hosts file (see another thread) and thinking that this would be a lot easier if I could just grep, cut, sort, wc, etc. like I do under Unix. Then I thought of that stuff I had on hand, and tried it out, and it worked! (As long as I wasn't trying to dick around with the file system).
But, as others have pointed out, code written specifically to work under Windows would be a much better solution. Still, when you're in a hurry, any car will do, rather than holding out for the limo.
#10
Join Date: Nov 2007
Location: HNL
Programs: UA Premier 1K
Posts: 296
#11
FlyerTalk Evangelist
Join Date: Jul 2000
Location: in the vicinity of SFO
Programs: AA 2MM (LT-PLT, PPro for this year)
Posts: 19,781
Shouldn't be surprising; 16 bit DOS and Windows are still supported on every 32-bit version of Windows (even 8!)
64-bit versions of Windows, all the way back to XP/2003 (or even further back, to NT on Dec Alpha!) abandon 16-bit support.
There's also DOSBOX, an absolutely free and absolutely wonderful DOS emulator that runs on pretty much every OS out there.
Indeed. Or there are a bunch of other ways of running both Windows/Linux with one or both virtualized, depending on one's hypervisor of choice and how old the hardware is.
https://en.wikipedia.org/wiki/Windows_Services_for_UNIX
https://technet.microsoft.com/en-us/.../cc771470.aspx
http://www.microsoft.com/en-us/downl...s.aspx?id=2391
I (heart) Cygwin. It's not quite perfect Unix, and it's not quite native Windows, but I haven't found anything else that does what it does anywhere near as well.
64-bit versions of Windows, all the way back to XP/2003 (or even further back, to NT on Dec Alpha!) abandon 16-bit support.
There's also DOSBOX, an absolutely free and absolutely wonderful DOS emulator that runs on pretty much every OS out there.
Indeed. Or there are a bunch of other ways of running both Windows/Linux with one or both virtualized, depending on one's hypervisor of choice and how old the hardware is.
https://technet.microsoft.com/en-us/.../cc771470.aspx
http://www.microsoft.com/en-us/downl...s.aspx?id=2391
Another vote for Cygwin - it is also easy to keep up to date!
Relevant: http://lifehacker.com/362316/use-uni...command-prompt
Relevant: http://lifehacker.com/362316/use-uni...command-prompt
#12
Moderator: UK and Ireland & Europe
Join Date: Jan 2003
Location: Biggleswade
Programs: SK*G, Lots of Blue Elsewhere
Posts: 13,613
Another vote for Cygwin here. The big advantage is having it installable on heavily policied machines. Having vim, sed, awk, perl and all such tools is a joy!
I will give GNUwin a try, though. Although, as we all know, GNU's Not Unix...
I will give GNUwin a try, though. Although, as we all know, GNU's Not Unix...
#13
Join Date: Nov 2007
Location: HNL
Programs: UA Premier 1K
Posts: 296
#14
Join Date: Nov 2007
Location: HNL
Programs: UA Premier 1K
Posts: 296
Thank you for the links! How would you compare the "Windows Services for Unix" experience with Cygwin?
#15
Join Date: Feb 2001
Location: London
Programs: AA EXP, SPG Plt
Posts: 2,607
Gow is a nice lighter-weight alternative
https://github.com/bmatzelle/gow/wiki
https://github.com/bmatzelle/gow/wiki