Ok, I'm just started to feel stupid because I just can't seem to get regular expressions working in Linux the way they work on Windows.
To keep things simple, here is a ridiculously elementary expression that should return a list of mounted samba shares.
Match the lines that start with '//'
Match any character until reaching whitespace
Code:
$ egrep '^//[^ ]*' /etc/mtab
I have tried multiple variations ([^\s],\S, etc) to match until whitespace is reached but no matter which variation I try the expression always matches the entire line and not just the share.
Code:
//baileyfs01/Profiles/developer /home/developer/network/baileyfs01/Profiles/developer cifs rw,mand 0 0
I've started to rely too much on $ cut -d ' ' in a lot of the scripts I'm migrating over to Linux and I want to get this RegEx figured out so I can do things properly before I get too wrapped up in recoding the more advanced programs and scripts.