09-08-2006
Thanks Ygor.honestly i was not aware of ${#var}.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm an intern at a company that recently bought out another business. In doing so, they inherited a unix system that contains files which they need to retrieve. No one in the company, including myself, really understands or knows unix so please respond with the true assumption that I'm a unix... (1 Reply)
Discussion started by: intern
1 Replies
2. UNIX for Dummies Questions & Answers
Good day, everyone!
Could anybody explain me the following situation.
If I'm running similar script:
Var="anna.kurnikova"
Var2="Anna Kurn"
echo $Var | tr -t "$Var" "$Var2"
Why the output is :
anna KurniKova
instead of Anna Kurnikova?
:confused:
Thank you in advance for any... (2 Replies)
Discussion started by: Nafanja
2 Replies
3. UNIX for Advanced & Expert Users
When i run this command on my linux machine:
mail -s "CVS ALERT-CRITCAL" sandy@xyz.com
The system hangs up producing a dead letter. What should i do to resolve this.
I am using :
mailx -s "CVS ALERT-CRITCAL" sandy@xyz.com
This cammnd works fine on another Linux machine but says"... (14 Replies)
Discussion started by: bsandeep_80
14 Replies
4. Solaris
I have printer old about 5 year , but I can not determine which driver to use
output of
ls -al /usr/share/lib/terminfo/h
-rw-r--r-- 1 root bin 961 Jan 22 2005 h1000
-rw-r--r-- 1 root bin 1002 Jan 22 2005 h1420
-rw-r--r-- 1 root bin 1009... (2 Replies)
Discussion started by: solaris_user
2 Replies
5. Cybersecurity
Hello, I hope all is well.
Two issues that I am grappling with.
One: Is this a true statement: (AIX, LDAP configured), even if authentication is configured with LDAP, the system would still need to be authenticated against local (/etc/passwd); incase of network failure?
Two: I can log... (0 Replies)
Discussion started by: rsheikh
0 Replies
6. UNIX for Dummies Questions & Answers
Hi All,
I have just installed my first Linux server ( Ubuntu 11.10 ).
I am sure I didn't allocate /swap , and double check by 'df -h', yes really no /swap
but when I use 'free -m' , returned a "Swap" line as below.
total used free shared buffers cached
Mem: ... (3 Replies)
Discussion started by: joaming
3 Replies
7. Shell Programming and Scripting
Hello All,
I have a problem in counting number of process getting run with my current script name..
Here it is
ps -ef | grep $0 | grep -v grep
This display just one line with the PID, PPID and other details when i print it in the script.
But when I want to count the numbers in my... (11 Replies)
Discussion started by: sathyaonnuix
11 Replies
8. Shell Programming and Scripting
hi
i am new to shell scripting.
i was going thru the part option and arguments. on this section i fail to understand the use of exit 0 in below example .
#!/bin/sh
USAGE="Usage: $0 "
case "$1" in
-t) TARGS="-tvf $2" ;;
-c) TARGS="-cvf $2.tar $2" ;;
*) echo "$USAGE"
exit 0
;;
esac... (13 Replies)
Discussion started by: scriptor
13 Replies
9. UNIX for Dummies Questions & Answers
HI, guys, I am having some problem with the echo command, so I want to echo some text to a file name loginFile, the result inside the loginFile should looks like:
expect ">"
so what I did is:
echo "expect "">""" >> $loginFile
but it just gave out:
expect >
The thing is I still need... (2 Replies)
Discussion started by: warmboy610
2 Replies
10. Shell Programming and Scripting
Hi folks,
If a declare a direct hash , then the hash element works fine.
my %test = ("test",1);
print %test;
print "\n";
Here in the above, the name of the hash is predeclared...
Suppose now I need to create the hash elements dynamically in the for loop.
$test="hash";
my... (1 Reply)
Discussion started by: scriptscript
1 Replies
LEARN ABOUT DEBIAN
wml::std::toc
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)