because you are taking input of less from somefile.
it works like this
1 -> execute ls , as you have used pipe , it will pipe stdout to stdin of next command : this is what you are telling
2 -> it will look second command.. it is less < somefile
as soon as it sees '<' redirection it will change stdin again to the file... Hence your previous change because of '|' is getting lost.
well, you can say it like this : less have taken input from file , it has nothing to do with ls's output.
Изman 5 passwd
:
the program to run at login (if empty, use /bin/sh). If set to a non-existing executable, the user will be unable to login through login(1).
Здесь ничего не говорится о запуске нескольких программ, поэтому нет, вы не можете поместить туда несколько программ.
Если вы хотите запускать несколько программ, вы можете создать сценарий, запускающий различные программы, и использовать этот сценарий в качестве оболочки входа в систему. Тем не менее, я не совсем понимаю, чего вы пытаетесь достичь.