On Wed, 24 Sep 2003 17:18:36 +0000
Abdussamad Abdurrazzaq <[EMAIL PROTECTED]> wrote:

> Hello
> 
> Please help me with these basic scripting questions. How do you tell the
> path of the current directory? 

Assuming you mean Bash scripting....

# echo $PWD

> Is there an equivalent to the Left$ & Right$ 
> functions found in BASIC in Linux scripting? What I mean is how do you 
> extract a given number of characters from the left or right of a string?

# a="ABCDEF"
# echo ${a::2}
AB
# echo ${a:${#a}-2}
EF

Cheers,
Sean
                                                                   
                                                 


-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to