How to take user input from bash script when run as executable without terminal?

I am trying to make a bash script which takes some user input and processes as per the input.

The script is executable, and has a shebang.

The script is somewhat like this:

#!/bin/bash read name -p "Enter your name"  echo $name >> namelist.txt 

I don't want the user to open the script in Terminal. The script is made executable (chmod +x), and double click on the script will make it run. But it doesn't pause to take input, and the file remains empty.


Category: linux Time: 2016-07-29 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 0.215 (s). 12 q(s)