The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



Thread: create paths
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 08-07-2007
alias47 alias47 is offline
Registered User
 

Join Date: Aug 2007
Posts: 7
Thank you - it was very useful! So, now I have one level, but there was 2 of them... Is it possible to use regex in index function? For example, how to find Aaaa->Bbbbb and insert it before 3rd level?

Ideas like:
awk 'if (index ($0, "[A-Za-z+->A-Za-z+]")>0) {print base $0} else {base = $0}} ' filename
does not work...

or maybe it is not necesarry to use regexes...
Reply With Quote