Does anyone know an easy way to remove the preceeding (/) and the trailing (/.../*) from the below file?
/usr2/.../*
/usr2a/.../*
/usr3/.../*
/usr3a/.../*
/usr3b/.../*
/usr4/.../*
/usr4a/.../*
I only need the usrXX part of this file. It seems there should be a way to do it with SED, but I just cant figure it out. I'm writing a script where I'll need to strip the usrXX part out of this file and compare it with the df output.
Thanks,
Shane
/usr2/.../*
/usr2a/.../*
/usr3/.../*
/usr3a/.../*
/usr3b/.../*
/usr4/.../*
/usr4a/.../*
I only need the usrXX part of this file. It seems there should be a way to do it with SED, but I just cant figure it out. I'm writing a script where I'll need to strip the usrXX part out of this file and compare it with the df output.
Thanks,
Shane