Skip to content
Advertisement

how can i cut one line on two on a cat /ect/passwd?

I’m trying to write a command that shows all odd lines of /etc/passwd:

I’ve tried:

JavaScript

but it didn’t work

JavaScript

Is there a different way to obtain the result?

Advertisement

Answer

The step syntax is a GNU extension. sed 'n;d' should be the portable version of your sed invocation.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement