From: UnixOS2 Archive To: "UnixOS2 Archive" Date: Thu, 29 Mar 2001 04:09:10 EST-10EDT,10,-1,0,7200,3,-1,0,7200,3600 Subject: [UnixOS2_Archive] No. 101 ************************************************** Wednesday 28 March 2001 Number 101 ************************************************** Subjects for today 1 Re: IFS in shell scripts : mlaitio 2 Re: Porting Joe's Own Editor (JOE) : mlaitio 3 Re: Re: Building Perl.exe as a test of manhood ;-) : mlaitio **= Email 1 ==========================** Date: Thu, 29 Mar 2001 12:49:01 -0800 From: mlaitio Subject: Re: IFS in shell scripts This is a multi-part message in MIME format. --------------050002050501060302010109 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit I just tried this same script in cygwin (with sh and bash) and they gave me results, which seems to contain much more null-characters... Here is the output and script I ran: -a_ -_ -_ -_ -_ -b_ -_ -_ -_ -_ -_ -_ -_ -_ -_ -c_ -a_ -b_ -_ -c_ -a_ -b_ -_ -c_ Mika Jun Sawataishi wrote: >At Sun, 24 Mar 2002 12:43:42 +0000, >John Poltorak wrote: > >>If I define IFS as a TAB does a single tab specify a field seperator? >>ie if there are two tabs together are they interpreted as a single tab by >>the shell? >>I want to set up a line such as:- >>p1TABp2TABp3TABp4 >>How do I specify a nul value for p2? >>What happens if I actually have? :- >>abcTABTABxyzTAB123 >>does p2 take the value xyz or nul ? >> >Using sh, ksh, and bash I tested how IFS worked. > > From now on represents TAB charactor not "\t". > > #script for IFS: tabtest.sh > IFS='' > x='abc' > for y in $x ; do > echo -${y}_ > done > IFS=';' > x='a;b;;c' > for y in $x ; do > echo -${y}_ > done > IFS='x' > x='axbxxc' > for y in $x ; do > echo -${y}_ > done > >Here I show the result. > >1 [k:/tmp] 00:34:32<1003># sh tabtest.sh >-a_ >-b_ >-c_ >-a_ >-b_ >-_ <== NOTE that this represents a null string >-c_ >-a_ >-b_ >-_ <== NOTE that this represents a null string >-c_ > > If you want to set a null string, do not use as IFS. > > > ># OS/2 is not a question, it's a solution. ># SAWATAISHI Jun ># http://www2s.biglobe.ne.jp/~vtgf3mpr/ > --------------050002050501060302010109 Content-Type: text/plain; name="tabtest.sh" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="tabtest.sh" #! /bin/sh #script for IFS: tabtest.sh IFS='' x='abc' for y in $x ; do echo -${y}_ done IFS=';' x='a;b;;c' for y in $x ; do echo -${y}_ done IFS='x' x='axbxxc' for y in $x ; do echo -${y}_ done --------------050002050501060302010109-- **= Email 2 ==========================** Date: Thu, 29 Mar 2001 13:27:24 -0800 From: mlaitio Subject: Re: Porting Joe's Own Editor (JOE) > > >Here's the termcap entry that I used: >OS2CMD:\ > :co#80:li#25:\ > :cm=\E[%i%d;%dH:\ > :nd=\E[C:\ > :so=\E[1;35;44m:se=\E[0;44m:\ > :us=\E[1;31;44m:ue=\E[0;44m:\ > :mb=\E[5m:md=\E[1m:mr=\E[7m:me=\E[0;44m:\ > :ti=\E[0;44m:te=\E[0m:\ > What are these termcaps and their entries? I know that there exist termcaps like ANSI, CYGWIN, OS2TERM, etc. and certain programs requites that certain termcap is defined for the TERM-variable... But that's all what I can understand... Could somebody give short tutorial to termcaps, what will following thing define forexample: :nd=\E[C:\ Mika **= Email 3 ==========================** Date: Thu, 29 Mar 2001 15:00:23 -0800 From: mlaitio Subject: Re: Re: Building Perl.exe as a test of manhood ;-) John Poltorak wrote: >On Tue, Mar 26, 2002 at 11:07:25AM -0500, Henry Sobotka wrote: > >>Edwin Günthner wrote: >> >>>Uups. And perl_ isn't part of your package if I remember that correctly. >>>Any plans / time to build a new package and drop it at Hobbes? >>> >>Yes. I should get a chance to tackle it over the upcoming long weekend. >> > >Is there any chance of you doing a special build with? :- > >Configure -des -D prefix=c:/usr/lib > >and just dumping it somewhere on:- > >http://www.elzahir.org/ > >UnixOS/2 really needs a PERL package as it seems to be a fundamental >building block, and try as I do, I'm not going to get anywhere close to >creating a build as good as yours. > I hope that you will not put this drive-letter fixed version to the UnixOS2 distribution, as I am using totally different directory for the OS/2-tools. (C is only small fat-partition which I can build very fastly). What I could try to do (slowly during the next few weeks) is to setup minimal parts of the UnixOS2-tools and gcc 3.03 (I would like to install also this in a way that it is integrated to unixos2-directory structure) to a totally fresh warp-machine and start testing autoconf & make combination for building and installing some UnixOS2-extra tools and libraries above that. The amount of time I spend at my home where I have OS2 available is very limited, there are some times weeks when I do not have time to read mails from my OS/2-mail-boxes, but in my spare time I really would like to help testing to get UnixOS2-distribution usable. Do you have any suggestions 1) What is the minimum set of tools I should install from the UnixOS2 binary-packages to get started. 2) Should I try to use bash or the newest PDKSH? (Is the newest pdksh bundlet to UnixOS2-distro?) as a sh? If I have understood correctly, OS2 bash maintainer is more willing to fix bugs I may encounter during the UnixOS2 build operations than OS/2 pdksh-maintainer. 3) Is there any fixes I should apply top of the newest autoconf? (I assume that I will download autoconf from the gnu's official ftp-site) Sorry, that I can not give any fast help, but as I said, the time I have access to OS2 is currently very limited. But if there is some easily separatable work I could do in small parts, then I believe I could be helpful. Mika