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
Post a Comment