10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I am new to scripting and I am trying to write a simple script that creates users and adds their passwords from two files; one a user list file and another a password list file.
For example, I have two files already.
$ cat file1
andy
stephane
aby
paul
$ cat file2
123
234... (4 Replies)
Discussion started by: FemoTheDon
4 Replies
2. UNIX for Dummies Questions & Answers
exmaple:
file1 and file2 has 1 bit
if
then
exit
else
send out email
fi
if
then
exit
else
send out email
fi
it exits the 1st if. did not continue with my 2nd if. thanks in advanced.
Please use CODE tags are suggested on every page when you post an item in... (7 Replies)
Discussion started by: lawsongeek
7 Replies
3. Shell Programming and Scripting
I had the below sftp script working perfectly but the problem is I am not able to send the echo statements .
#!/bin/sh
echo "Starting to sftp..."
sftp admin@myip << END_SCRIPT
cd /remotepath/
lcd /localpath/
mget myfiles*.csv
bye
END_SCRIPT
echo "Sftp successfully."
echo
echo... (11 Replies)
Discussion started by: scriptscript
11 Replies
4. Shell Programming and Scripting
I'm working on a script for class as a final project. We have to ask for values (city, state, zip) five times, but the state can only be MI, IN, IL, or OH. I'm trying to do this with a while loop inside of a while loop, but I have no idea how to do it properly.
Here's what I have so far:
... (3 Replies)
Discussion started by: nickzourdos
3 Replies
5. Shell Programming and Scripting
Hi All,
I need to check for 3 conditions and if all the 3 are not satified need to say that services are not running....
is the below code correct.
#********** Check to see if Service 1 is still running**************
if
then
echo "$datetimestamp: Service1 is not running" >>... (4 Replies)
Discussion started by: ch33ry
4 Replies
6. Shell Programming and Scripting
Hi ,
I have a peculiar problem.
i have an if block like this
if ;
then
echo " todays date is " ${date} >> log_file
echo " file count is " $ count >> log_file
mv filename1 filename 2
else
echo "no files available ">> log_file
fi
the echo statement "no files available " is not... (2 Replies)
Discussion started by: wizardofoz
2 Replies
7. Shell Programming and Scripting
i want to use multple sql count statements and store these count values in unix variable but in one connection only i.e. in only 1 time database should be hit ,which is the main requirement. (1 Reply)
Discussion started by: sw@pnil
1 Replies
8. Shell Programming and Scripting
Hi,
I am unable to get idea, how to write the script like multiple choice exam model script , how to specify the welcome to the exam(name) and if he select
option then it has to enter into the exam , then choosing the answers,next question and going to previous question.
Thanks & Regards
... (0 Replies)
Discussion started by: palreddy7
0 Replies
9. Shell Programming and Scripting
Hi,
At the moment, I have the following statements which show like this, but I want it all on one line. How can I do this?
----------------------------
echo "There are"
cat menu | wc -l
echo "characters in the text"
----------------------------
Thanks! (5 Replies)
Discussion started by: kev269
5 Replies
10. Shell Programming and Scripting
Hello there,
I wrote a shell script to modify the code for some of our clients in our client database. Before starting the data modification the program performs a few checks.
When a check is being performed, it should be shown on the screen of the user running the program, the result of... (5 Replies)
Discussion started by: JoBa
5 Replies