Solaris / OpenSolarisThis forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I don't use ksh, but with bash at least ${variable##pattern} means:
- Display $variable where the longest match of pattern at the start of the initial value is removed.
Likewise, ${variable#pattern}, ${variable%%pattern} and ${variable%pattern} respectively mean:
- Display $variable where the shortest match of pattern at the start of the initial value is removed.
- Display $variable where the longest match of pattern at the end of the initial value is removed.
- Display $variable where the shortest match of pattern at the end of the initial value is removed.
There are other such usefull notations. See the man page.
Thanks to both for the information.
Could you tell me which man page to refer.
Is it the ksh man page? I see it but there is no information regarding the constructs.
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
From the ksh manual page:
Code:
${parameter##word} Remove Largest Prefix Pattern. The word
is expanded to produce a pattern. The
parameter expansion then results in
parameter, with the largest portion of
the prefix matched by the pattern
deleted.
I was referring to some abridged doc.
Found the complete ksh man page!
I was referring and i found the following points.
1. ; causes sequential execution of the previous pipeline.
2. & causes asynchronous execution of the previous pipeline.
3. |& causes asynchronous execution of the previous pipeline with a two-way pipe established to the parent shell.
Could you help me out with some example for point 3.
Also,
What is the difference between
Code:
Command /dev/null 2>&1
and
Code:
Command 2>&1 /dev/null
Thanks in advance,
Kind regards,
indiancosmonaut
Last edited by indiancosmonaut; 08-29-2007 at 04:32 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.