linux - bash script writing shell commands -


why commands require echo statement others can written without:

#!/bin/bash

aptitude upgrade

echo "mysql-server-5.1 mysql-server/root_password password $db_password" | debconf-set-selections

the commands feed on stdin input process, fed echo command. echo dumps string provided on stdout, in turn duplicated on stdin using pipe "|". commands not require input stdin or uses other method of input process can written without echo command.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -

PostgreSQL 9.x - pg_read_binary_file & inserting files into bytea -