← Morgan Stanley questions

Unix commands for files and pipes

Filed under Morgan Stanley

Write Unix commands to get the last 10 lines of a file, find a pattern using cat and grep, get lines 50 to 100, and explain what happens when the first command in a pipe fails.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Morgan Stanley questions

Collected from public candidate posts and coding forums. Updated Nov 2026.