AWK/SED to remove first part of path -


i'm writing script pull users ad home , i've been able users smbhome dscl command , need path this:

//server-01/home-employee/user_name 

to this:

/home-employee/user_name 

i've tried used awk command of /usr/bin/awk 'begin{rs="//"; fs="/"}{print$1}' think i'm going in wrong direction here. sed better choice?

for example, using sed:

kent$  echo "//server-01/home-employee/user_name"|sed 's#//[^/]*##'  /home-employee/user_name 

Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -