Code: Select all
MUSICDIR=/root/Music
DEVDIR=/mnt/sdb1/music
diff $MUSICDIR $DEVDIR | grep "Only in $MUSICDIR" | sed -e s/"Only in $MUSICDIR: "//
Code: Select all
Only in root/Music: Alice in Chains
Only in root/Music: Foo Fighters
etc.
Code: Select all
sed: -e expression #1, char 17: unknown option to `s'
Code: Select all
s/regexp/replacement/
Attempt to match regexp against the pattern space. If successful, replace that portion matched with replacement. The replacement may
contain the special character & to refer to that portion of the pattern space which matched, and the special escapes \1 through \9 to
refer to the corresponding matching sub-expressions in the regexp.