execute shell commands with nodejs | part 1

preview_player
Показать описание
using nodejs, execute shell commands as child processes
using exec and spawn
differences between exec and spawn

crazy idea huh!

00:00 Intro
01:07 Totall overview of nodejs processes and threads
02:12 Exec method of running shell commands in nodejs
04:39 Spawn method of running shell commands in nodejs
07:12 Outro

#nodejs
#shell
#exec
#command
#terminal
#bash
#remote
#execution
#linux
#spawn
#application
#backend
#devops
#process
#child

USEFUL********

link for docker image layer caching:

python official docker hub page:

PLAYLISTS*******

let's talk a bit :-*
LINKS********
Рекомендации по теме
Комментарии
Автор

You have to create a bash like shell. When the shell is started, it should have default working directory set to user’s home directory. The term spawned process refers to the child processes created by the shell.js that you are going to write as part of this assignment.

In this shell, following command must work

cd <directory_name> - Should work same as bash shell.
pwd - Prints current working directory.
ls <directory_name> - Should work same as bash shell. Support for flags is not required.
<path_to_binary> <args>- When path to a binary is provided, that binary should be spawned as a child process. The binary must receive all the arguments passed as space separated like arg1 arg2 ….
fg <pid> - Brings the background process with process id <pid> to foreground.
exit - Closes the shell.

Following key combination should work the same as in shell:

Ctrl + C - Sends a SIGINT to the spawned process.
Ctril + Z - Sends spawned process that is currently in foreground to the background. Prints it’s pid after setting the current process as background process.

Shell must start with the following command:

```
> node shell.js

could you please help me with this problem???

Kg
visit shbcf.ru