sed -n 2~2p filename
will print even-numbered lines from filenamesed -n 1~2p filename
will print odd-numbered lines.Source: http://unix.stackexchange.com/questions/26723/print-odd-numbered-lines-print-even-numbered-lines
Until now, I was trying to keep my Linux (and other related) notes on a static web page, and using other local software on my PC. Finally, I decided to create this blog to make easier for me the task of updating my notes from any place and to have quick access to them.
sed -n 2~2p filename
will print even-numbered lines from filenamesed -n 1~2p filename
will print odd-numbered lines.useradd username
passwd username
To create a new user with directory add -m option
$ which bash (to kwnow the path to bash)