You don't nullify the name temp variable after generation.
However you should also make the code as re-usable as possible.
Here's a quick example.
The names are now in title case and should you need to generate random characters or names again you have pre-written functions.
Last edited by Skrynesaver; 04-08-2011 at 07:27 AM..
Reason: neatened the code
This User Gave Thanks to Skrynesaver For This Post:
Ok, Thanks for the help. I appreciate it.
Now I have generated 4 types of names similarly like the above example.
I am able to insert 1st generated data into the database. But how will I insert several fields. I am generating 4 different types of random names ( fname, lname, userid & email id)
/here is the code i am trying with
I am getting the following error when I execute. ---------- Post updated at 10:25 AM ---------- Previous update was at 10:00 AM ----------
Never mind I got it rite.
I removed all the for loops and added only 1 for loop at the beginning .
This is working fine.
i have windows 8 host on Dell Laptop
vmware 9
redhat 7.2 iso downloaded through redhat official site
after installation on vm it only boots into text dont show graphics
Please guide:( (1 Reply)
Hi, I am beginner perl input I just want to know if I want to make a program that let user input a function such as input " < value " List all files that are less than value The current directory is used. eg input " < 5" list all file that less than 5 in current directory until user input "quit"
... (4 Replies)
how do i implement a script that asks user to input a word. it should ask for input a word continuously until the word is longer than 5 characters then stop.
this is what i have so far
#!/bin/bash
read -p "enter word" word1
while ; do
echo "continue"
done (4 Replies)
Hello,
I am trying to write a script that reads names from a file called input, removes names if they have the same letter next to each other and prints the others.
e.g. Colin & John would be printed
Garry & Lynn would be removed
My thinking is that I read in each name and... (3 Replies)
Hi people....
I have just started to learn unix.I want to know which version of Unix to install plus how to install it.I need to practise and make myself aware of how unix works.My thread is from an educational point of view.Also please feel free to give your suggestions as I am... (3 Replies)
I need to write a script to test a nsort c program. I have written 8 .txt files with different cases. Also 8 .txt files with expected outcome. The shell I have written always "test pass" for the first case but always "fail" for the rest... Here is a portion of my code (as I still don't know how to... (5 Replies)
hi guys,
i have a DEl xps laptop cor 2 duo 2.2
i have vista installed on it
i want to install a dual Boot UNIX on it..
can some one guide me ...cause i m tottaly new to UNIX
i want to install unix on that laptop along with Vista....
thx
any help would be deeply appreciated
(sorry if i... (5 Replies)
Anyone know where I can get started in C++ programming in unix?
Any good free tutorials or websites to start at?
I am okay in unix scripting but have never done c programming of any sort...
What are the main advantages of using C++ ? (2 Replies)
Alrigt, I need to write a shell script where it counts the number of folders and files and dispays "My home directory has 'x' files and 'y' directories."
So, I was thinking of doing this.
set x = `ls | wc`
so, if I have 8 files and folders in my home directory, x is not 8.
now, I was... (1 Reply)