Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • Is there anyway to parse out everything after the STREAM directory? $: OLD_STREAM=readlink $ORACLE_BASE/admin/database1/backup $: echo $OLD_STREAM $: /oradba/app/oracle/acfsmounts/global/STREAM1a/database1/backup I would like it to echo: /oradba/app/oracle/acfsmounts/global/STREAM1a/ Commented May 23, 2014 at 15:13
  • I'm trying to automate that... For ease of implementation I think I should get it to echo "/oradba/app/oracle/acfsmounts/global/STREAM1a/database1/" The regular expression .*\/database1\/ will achieve this but I need to figure out how to use substrings in Linux to use that regular expression. Commented May 23, 2014 at 15:40
  • OLD_STREM=$(echo $(dirname $(dirname $OLDBACKUP))) Commented May 23, 2014 at 15:44