Linux Today: Linux News On Internet Time.
Search Linux Today
Linux News Sections:  Developer -  High Performance -  Infrastructure -  IT Management -  Security -  Storage -
Linux Today Navigation
LT Home
Contribute
Contribute
Link to Us
Linux Jobs

Partner Sites
JustLinux.com
Linux Planet
PHPBuilder
Technology Jobs

Top White Papers

  • The number, complexity, and diversity of cyber threats are soaring. Businesses are increasingly concerned about the risks they face and 91% of organizations...
    Download

  • Spend Less and Get More with Today's New Unified Enterprise IT Monitoring Solutions Live Event Date: May 28, 2013 @ 2:00 pm ET / 11:00 am PT Did you...
    Download

More on LinuxToday


Normalizing Path Names with Bash

Sep 04, 2009, 01:34 (0 Talkback[s])
(Other stories by Mitch Frazier)

"Each time a dir/.. match is found, variable expansion with substitution is used to remove the matched part of the path.

"Regular expressions were introduced in bash 3.0. Bash 3.2 changed regular expression handling slightly in that quotes around regular expressions became part of the regular expression. So, if you have a version of bash (with regular expression support) and the code doesn't work, put the regular expression in the while loop in quotes."

Complete Story

Related Stories: