Sentence for, Help!

Sentence for, Help!

Post by Maur » Tue, 20 Oct 1998 04:00:00



Hello:

 Whats the way to get a sentece for i= 1 to 512 in Shell on AIx?
 Ex.
         for i = 1 to 512  ???????
         do
              echo $i
         done

  Where Can I get information about K-Shell programming on AIx.?

 Thanks
 Mauro M.E

 
 
 

Sentence for, Help!

Post by Stephane CHAZEL » Tue, 20 Oct 1998 04:00:00



>Hello:

> Whats the way to get a sentece for i= 1 to 512 in Shell on AIx?
> Ex.
>         for i = 1 to 512  ???????
>         do
>              echo $i
>         done

yes "" | head -512 | nl -ba -nln

or a while loop.

--
Stphane

 
 
 

Sentence for, Help!

Post by Niall Smar » Wed, 21 Oct 1998 04:00:00


Quote:> > Whats the way to get a sentece for i= 1 to 512 in Shell on AIx?

> yes "" | head -512 | nl -ba -nln

> or a while loop.

Well, I guess you learn something new everyday.  Is nl
an old SYSV thing?  cat -n may be more portable.  FYI:

[caesar ~]$ echo $SHELL
/usr/local/bin/zsh
[caesar ~]$ echo {3..10}
3 4 5 6 7 8 9 10

Niall

 
 
 

Sentence for, Help!

Post by Tapani Tarvaine » Wed, 21 Oct 1998 04:00:00



>  Whats the way to get a sentece for i= 1 to 512 in Shell on AIx?
>  Ex.
>          for i = 1 to 512  ???????
>          do
>               echo $i
>          done

ksh:

i=0
while (( (i+=1) <= 512 ))
do
        echo $i
done

--
Tapani Tarvainen

 
 
 

Sentence for, Help!

Post by brian hile » Thu, 22 Oct 1998 04:00:00




>> Whats the way to get a sentece for i= 1 to 512 in Shell on AIx?

Oif! _Three_ processes to do what should have never required even one:

typeset -i i=-1
while (((i+=1) <= 512))
do      echo $i
done

Quote:> Where can I get info on ksh for AIX?

Really, _any_ source on ksh will do; hwoever, the below specifically deals
with ksh on AIX:

http://garfield.ir.ucf.edu/manual/aix/bourne.html

-Brian

~
~          

 
 
 

Sentence for, Help!

Post by Bruce Fountai » Thu, 22 Oct 1998 04:00:00



> Well, I guess you learn something new everyday.  Is nl
> an old SYSV thing?  cat -n may be more portable.  FYI:

nl is supported on three of the four platforms I can access from
here: HP-UX 9.05, Solaris 2.5.1 and SCO_SV 3.2 but not FreeBSD 2.2.2.

cat -n is not supported on HP or SCO, but is on Solaris and FreeBSD.
From my sample nl is more portable.

Regards,

Bruce

+--------------------------------------------------------------------------+
| Bruce Fountain                 NEC Australia - New Product Development   |

+--------------------------------------------------------------------------+

 
 
 

Sentence for, Help!

Post by Geoff Cla » Fri, 23 Oct 1998 04:00:00



>> Well, I guess you learn something new everyday.  Is nl
>> an old SYSV thing?  cat -n may be more portable.  FYI:
>nl is supported on three of the four platforms I can access from
>here: HP-UX 9.05, Solaris 2.5.1 and SCO_SV 3.2 but not FreeBSD 2.2.2.
>cat -n is not supported on HP or SCO, but is on Solaris and FreeBSD.
>From my sample nl is more portable.

Yes it is.  All UNIX95 and UNIX98 compliant systems must have nl, but
they are not required to support a -n option to cat.  (The only option
specified for cat is -u.)
--

UniSoft Limited, London, England.
 
 
 

1. Help with extracting word from sentence

Hello,

if $line="0x12345    word1 word2 .. wordn    0x67890         word"

How can I set value equal to the second "0x" value ?

ie. value="0x67890"

Thanks  in advance.

--
_____________________________________________

Dimension Data:
PO Box 236, Pavillion, 3611, South Africa
(+27)-31-568-2032 (Work)
(+27)-31-204-8590 (Fax)
082-771-8519 (Cell)

2. Multi-Boot Madness!!

3. "Segmentation fault( core dumped ) "<--- sentence is driving me mad!!!!!

4. using mpack send attachment in UNIX

5. Would you please explain this shell sentence for me?

6. Adaptec 6260/6270 + Connor 850meg

7. Replacing a sentence with a multiline text.

8. selection corrupt on tty2

9. Funny linux sentence...

10. The Fifth Sentence

11. Placing sentences on separate lines

12. Howto count the number of characters in a sentence matching my request

13. Peterson's Death Sentence