e.g path name: /home/code/work I want to print like this.
/home /home/code /home/code/work
I tried this one line, didn't print what I wantecho "/home/code/work"|perl -lane 'while(m#([^\/]+)#g) {print "$1";}'
home code work
Can some one help me on this? ThanksIn reply to Regular expression parse pathname by unixguy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |