LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   ksh variable? (https://www.linuxquestions.org/questions/programming-9/ksh-variable-567079/)

davee 07-06-2007 05:56 AM

ksh variable?
 
Hi all,

I've go the following two lines at the top of a ksh script:

logfile=`ls -t /www/Apache/logs/error_log.* | head -1`
oldlog=/root/unix_admin/${logfile##*/}

I've never come across the ##*/ before, and it's not the easiest thing to Google... Is it regex notation? If not, what is it? I'm not a ksh expert, but I know what I'm doing in bash...

Cheers in advance,

Davee

chrism01 07-06-2007 06:24 AM

Here is where you want to start reading: http://www.kornshell.com/doc/
Basically it's ksh's way of extracting some substring I think (ie ksh specific regex notation)


All times are GMT -5. The time now is 07:04 PM.