sed -n -e 24p -e 24q | cut -c27-34
sed -n '24p;24q' | cut -c27-34
The
-n option means 'do not print lines by default'; the 24p means print line 24; the 24q means quit after processing line 24. You could leave that out, in which case sed would continue processing the input, effectively ignoring it.