Sponsored Content
Full Discussion: Version M-11/16/88f
Top Forums UNIX for Beginners Questions & Answers Version M-11/16/88f Post 303030855 by bakunin on Monday 18th of February 2019 02:38:31 AM
Old 02-18-2019
Quote:
Originally Posted by ded325
if below notation is not suport byt KSH version M-11/16/88f
what is the alternative i can use

FILE_PREFIX=${fileNAme:$len:4}: 0403-011 The specified substitution is not valid for this command.
You can use these:

Code:
${var#<regexp>}
${var##<regexp>}
${var%<regexp>}
${var%%<regexp>}

Since you want a "substring"-function you may be interested in knowing you can nest these expansions like i.e. this:

Code:
${var##{var%%??}}      # only the last 2 characters of any string
${var%%{var##??}}      # only the first 2 characters of any string

You can use these or similar for subsequent expansions, i.e.:

Code:
${var:2:3}      # substring in ksh93-notation to emulate
var=${var##??}   # cut off first two characters
${var%%${var##???}}   # display first 3 characters of resulting string

From the version string of your ksh88 i guess you use AIX. You have a ksh93 available per default in /usr/bin/ksh93.

I hope this helps.

bakunin

Last edited by bakunin; 02-18-2019 at 12:07 PM.. Reason: typo
These 2 Users Gave Thanks to bakunin For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

what version am I using?

Hi Im new here and pretty new to Unix. Just a couple of questions How can I tell what version of Unix I'm running? and Also I hope this makes sence, when writting scripts/programmes does it matter what Im writting it in? ie what shell? Or is it just identical whatever shell Im... (1 Reply)
Discussion started by: Loaded Gun
1 Replies

2. UNIX for Dummies Questions & Answers

version of OS

Hi , what is the command to find the version of OS running on a unix box? Thanks. (4 Replies)
Discussion started by: tselvanin
4 Replies

3. UNIX for Dummies Questions & Answers

VERSIOn

Hi, I would like to know, how do I findout what version UNIx OS my computer is using? Is there a particular command I type to do this? Please advise. Thanks (1 Reply)
Discussion started by: huhuloa
1 Replies

4. UNIX for Dummies Questions & Answers

What OS version am I on?

I'm trying to figure out the exact version of the AIX box I'm on. Like whether it's 5.1 or 5.2. I tried lsconf and smit but they didn't give the answer. Does anyone know a command that returns this value? I don't have root access. (3 Replies)
Discussion started by: rein
3 Replies

5. HP-UX

What is my Version

Hi, This is my HP-UX version, hpprod::root>uname -a HP-UX hpprod B.11.11 U 9000/800 1110164401 unlimited-user license hpprod::root> but I've already patch with, PHSS_30101 1.0 Support Tool Manager Dec 2003 PHSS_30170 B.11.11.18 ... (1 Reply)
Discussion started by: aldosfox
1 Replies

6. Solaris

Migrate unix version 8 to version 9

i have a program writing in PRO C which currently running in unix version 8 tie with oracle 8i, but in the future company gonna migrate this OS to version 9. Anything i have to prepare for my PRO C program to run in unix version 9? or anything would that impact my program couldn't run well? what... (2 Replies)
Discussion started by: lsy
2 Replies

7. Shell Programming and Scripting

version of OS

How to know the whether the system in IBM-AIX, or HP-UX or Sun Solaris? I have typed command "version" at the prompt and i got machine hardware: sun4us OS version:5.9 and more.... So is my system Sun Solaris Please let me know how can i find the OS (2 Replies)
Discussion started by: vasuarjula
2 Replies

8. UNIX for Advanced & Expert Users

Advanced Search * View * Edit JAVA version to WORK in GLASSFISH Forum topic JAVA version

Would like to confirm the ff. I got confused actually with the version I needed to download that will work on glassfish 3.0.1 a. Debian Squeeze (HP DL360). Need to use java version6 On Debian, I did apt-get install sun-java6-jdk. So when I check it's java version "1.6.0_22" Java(TM) SE... (1 Reply)
Discussion started by: lhareigh890
1 Replies

9. Shell Programming and Scripting

Copy a file from directroy/ prior version to the directory/ new version

How to copy a file from directroy/ prior version to the directory/ new version automatically. (4 Replies)
Discussion started by: roy1912
4 Replies

10. Red Hat

OS version and Firmware version

Guys, How to find OS version and firmware version in LINUX? Like in AIX. uname -a will show me the version 5.3, 6.1,7.1. lsmcode -c will show me - system firmware image as SF240_417. What are the similar commands in Linux. I checked uname -a and cat /etc/release. uname... (1 Reply)
Discussion started by: ElizabethPJ
1 Replies
wml::std::toc(3)						     EN Tools							  wml::std::toc(3)

=LT=define-tag toc_section endtag=required> =LT=set-var __i=0 /> =LT=while =LT=lt =LT=get-var __i /> %0 />> =LT=<get-var toc_style
/>*=LT=toc_style_type =LT=get-var __i /> />> =LT=increment __i />=LT=/while> <li*> %body =LT=set-var __i=0 /> =LT=while =LT=lt =LT=get-var __i
/> %0 />> =LT=/<get-var toc_style />> =LT=increment __i />=LT=/while> =LT=/define-tag> "
       "=LT=" "<"
    /> </when>

       #   Define the <HX> and <TOC_HX> container tags (X = 1...6) <set-var __i=1 /> <set-var __pad= /> <while <lt <get-var __i /> 7 />>
	   <subst-in-string " =LT=define-tag h<get-var __i /> endtag=required> =LT=h<get-var __i />* %attributes> =LT=toc_h<get-var __i />>
       %body =LT=/toc_h<get-var __i />> =LT=/h<get-var __i />*> =LT=/define-tag> "
	       "=LT=" "<"
	   />
	   <subst-in-string " =LT=define-tag toc_h<get-var __i/> endtag=required> =LT=preserve alt/> =LT=set-var alt=/> =LT=set-var
       %attributes/> =LT=a name="ToC=LT=get-var __TOCCNT/>">%body</a> {#ToC#: =LT=toc_section <get-var __i/>> <get-var __pad/> =LT=a
       href="#ToC=LT=get-var __TOCCNT/>"><strong> =LT=or =LT=get-var alt/> %body/> </strong></a> =LT=/toc_section> <get-var toc_eol/>
       :#ToC#} =LT=increment __TOCCNT/> =LT=restore alt/> =LT=/define-tag> "
	       "=LT=" "<"
	   />
	   <set-var __pad="<get-var __pad /><get-var toc_pad />" />
	   <increment __i /> </while>

       ##EOF## __END__

NAME
wml::std::toc - Table of Contents Generation SYNOPSIS
#use wml::std::toc [style={pre,nbsp,hspace,ul,ol} [type=...]] <toc> <hN>...</hN> <toc_hN ...>...</toc_hN> DESCRIPTION
This creates a table of contents which can be inserted at any point (even more than once) by the "<toc>" tag. The contents gets created out of all header tags ``"<hN>"'' where ``N'' also controls the indention in the table of contents. Alternatively you can use the "<toc_hN>" tags to insert its body (can be empty!) at the current location and into the Table Of Contents. If specified, the "alt" attribute is included into the ToC instead of the body. STYLES
You may specify any of the five styles "pre", "nbsp", "hspace", "ul" and "ol". The last two accept special options to render HTML lists. With "style=ol", you may choose types 1, "A", "a", "i" and "I" whereas "style=ul" provides "d", "c" and "s" for respectively discs, circles and squares. EXAMPLE
Below is an example to render the Table of Contents with HTML "<pre>" tag. #use wml::std::toc style=pre #use wml::std::page <page> <h1>Chapter 1</h1> <h2>Section 1</h2> <h2>Section 2</h2> <h1>Chapter 2</h1> <h2>Section 1</h2> <h2>Section 2</h2> <toc> Play and choose your favorite! #use wml::std::toc style=ol type=A1ai or #use wml::std::toc style=ul type=dssccc AUTHORS
Ralf S. Engelschall rse@engelschall.com www.engelschall.com Denis Barbier barbier@engelschall.com REQUIRES
Internal: P1, P2, P5, P6 SEE ALSO
HTML "<Hx>" "<UL>" "<OL>" tags. EN Tools 2014-04-16 wml::std::toc(3)
All times are GMT -4. The time now is 05:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy