Hello Safi, Thanks for the input. I will put in comments to improve the readability of the script. Also, I did not understand your comment, "The command-line argument approach is an effective way to receive data input." Could you explain is a more laymen term.
Thanks. Suhail On Thu, May 7, 2020 at 11:14 AM SAIFI <[email protected]> wrote: > On Sat, 2 May 2020, Muhammed Suhail wrote: > > > Hey I'm trying to run the following script. But the program is not > running > > after the initial input stage: > > > > if [[ $?=0 ]] > > then > > read -p 'Enter the new username' $user_name > > read -p 'Enter Real name' $comment > > read -p 'Enter password' $password > > exit 0 > > else > > exit 1 > > fi > > > > The command-line argument approach is an > effective way to receive data input. > > $1 -- $user_name > $2 -- $comment > $3 -- $password > > You write the code towards validation > and subsequent processing. > > Bonus, you can integrate the script at a > later point in time by a one-liner in > your new script. > > If truly interactive input is required, > please use 'dialog' within your script. > > > Saifi. >

