This is the command I am using:system_profiler | sed -n -e '/SATA/SATA Express:/,/Software:/ p'It gives me this errorsed: 1: /SATA/SATA Express:/,/S ...: invalid command code SI don't see why it doesn't work especially when this almost identical command works:system_profiler | sed -n -e '/Hardware Overview:/,/Installations:/ p' I don't know? There's no reason to escape S.
Invalid command code with sed
sed;osx
Escape the / between SATA and SATA Express: to make it literal:system_profiler | sed -n -e '/SATA\/SATA Express:/,/Software:/ p'or use a different delimiter using this syntax:system_profiler | sed -n -e '\|SATA/SATA Express:|,/Software:/ p'