# for i in /usr/local/bin/test.ext /usr/local/bin/test test.ext test; do \
perl -le 'printf "Src: %s\n\tPath: %s\n\tFile: %s\n\tName: %s\n\tExt: %s\n",$ARGV[0],($ARGV[0]=~ m#^(.+/|)(([^.]+).?(.+?|))$#)' $i; \
done
Src: /usr/local/bin/test.ext
Path: /usr/local/bin/
File: test.ext
Name: test
Ext: ext
Src: /usr/local/bin/test
Path: /usr/local/bin/
File: test
Name: test
Ext:
Src: test.ext
Path:
File: test.ext
Name: test
Ext: ext
Src: test
Path:
File: test
Name: test
Ext:
Page Summary
Style Credit
- Style: Neutral Good for Practicality by
Expand Cut Tags
No cut tags
no subject
Date: 2007-06-29 09:43 am (UTC)perl -e 'printf"Src: %s\n\tPath: %s\n\tFile: %s\n\tName: %s\n\tExt: %s\n",$_,m#^(.+/|)(([^.]+).?(.+?|))$#for@ARGV' \ /usr/local/bin/test.ext /usr/local/bin/test test.ext testno subject
Date: 2007-06-29 05:07 pm (UTC)no subject
Date: 2007-07-13 06:10 pm (UTC)