Hot answers tagged

5

No, a basic Bourne/POSIX shell (/bin/sh) cannot be expected to include any built-in facilities for TCP connections. See comparision of command shells in Wikipedia. The bash shell would have TCP and UDP client capabilities with a special handling of certain filenames: for example, using /dev/tcp/<hostname>/<port> in input/output redirection on a ...


4

The easiest solution would be to use git-shell as the user's login-shell. A detailed description on how to set this up can be found here: https://git-scm.com/docs/git-shell or alternatively on the git shell manpage man git shell


2

in Bash, execution of code after each command can be achieved using the "trap" builtin and the "DEBUG" level. in bash do: help trap or refer to bash manual page, and look for the trap section example: trap 'date' DEBUG This will execute the command "date" juste after each command. Of course you can format the timestamp as you want, refer to the "date" ...


2

Most probably you have a reference to a database 'rb' in the sql file rurdevdrpl.sql. It could either be that rb has been defined as the default database with USE rb; or as an option to a sql statement like e.g. INSERT INTO TABLE rb.test (a, b, c) VALUES (1, 2, 4); So check your file for occurences of these two. To replace them you could use sed, but it'...


1

You can simply use SSH. Typically you would use a public/private key pair to allow the master to log into the slave without requiring a password. Then use SSH user@slave.IP "command" Note that command can be a single command, a comma separated list of commands or even multiple lines. You can use single quotes for an exact command or double quotes if ...


1

You didn't specifically mention that the commands are to be invoked from the web-app, so I'll assume that's not the case, as this would make the question more 'solution specific'. The simplest method, assuming you have ssh access. Do this on the terminal of serverA: $ cat > script.sh cat /proc/sys/kernel/hostname ^C $ scp script.sh ...


1

find ./ -maxdepth 1 \ -type d \ -name 'app-deployment-*' \ ! -name 'app-deployment-245a578' \ -exec echo rm -rf {} + Explanations: -maxdepth 1 mean without recursion; -type d mean search only for directories; -name 'app-deployment-*' is a pattern of directories you are searching for; ! -name 'app-deployment-245a578' is a ...


Only top voted, non community-wiki answers of a minimum length are eligible