Возможно ли иметь много программ запуска в файле / etc / passwd?

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.

0
12.03.2018, 20:06
1 ответ

Из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).

Здесь ничего не говорится о запуске нескольких программ, поэтому нет, вы не можете поместить туда несколько программ.

Если вы хотите запускать несколько программ, вы можете создать сценарий, запускающий различные программы, и использовать этот сценарий в качестве оболочки входа в систему. Тем не менее, я не совсем понимаю, чего вы пытаетесь достичь.

1
28.01.2020, 02:43

Теги

Похожие вопросы