I'm new to bash and have written this script to collect data then save it to an automated file. It runs fine til here but as I try to rerun the script to add another details it gives me errors.
#!/bin/bash
#This program helps the user to collect contact details.
clear
options="Add_User End_session"
echo "1. Add another user"
echo "2.
Dear Sir,
May I know how do I go about adding the following feature into the script below:
When user enter values other than 1,2,3,4,
a) Message “Wrong entry !!!
I create a bash script with using case syntax. My bash script option must be "./script user hello". Below is the content of the script.
Quote:
user=`echo "$1" | sed "s/$/@foo.com/"`
case $1 in
*)
echo "From: $user
TEST1" > /var/log/test1
Hi guys...was trying to use while loop and a sentry to prompt user input again if an invalid option was entered...but somehow I got a "while" unmatched error...The code is as below:
Code:
#!/system/bin/sh
finsh=0
while [ $finish -ne 0 ]
do
echo "Please select an option: "
echo "1. One" echo "2. Two"
echo "3. Three"
echo "4.
I am trying to add a textfile to the desktop and then delete it, i did have the code working to create the file, but now whenever i create it, it then makes me put data into it, whatever i type in the terminal is saved into the created txt file.
Hey guys,
I want to paste a code in a .php file via a bash script.
Hey guys, I was wondering if any linux gurus could help add zenity to a script. If anyone could show me what the script below would look like with zenity added to it would be greatly appreciated.
#!/bin/bash
dvdencoder=./dvd-it-encode.sh
if [ $# -lt 3 ]
then
echo \
echo Insufficient arguments.
I am forming a new question based on an earlier one I posted here in regards to a BASH Script I am writing.
Hello all,
I am currently writing a script to send files to a server over sftp.