need help with a shel script plzz

 
Thread Tools Search this Thread
Homework and Emergencies Homework & Coursework Questions need help with a shel script plzz
# 1  
Old 08-16-2011
need help with a shel script plzz

hey how u doing guys ... I'm a student @ EMU and taking a beginner Linux class and I have those two extra credit project that im struggling with so I hope to get some correction and help

write a shell script that will
1-prompt the user for a file name
2-check to see if the file exists
3-create the file if the file does not exist
4-then go back and repeat step 1 if the file doesn't exist

#!/bin/bash
if test -e filename
echo "the file is exist."
else
echo "the file is not exist."
echo "filename" > "filename1"
fi

==============================

the other script
create a shell script that will
1- prompt for four file names
2- combine all of the data in the first three files into the fourth one
# 2  
Old 08-16-2011
This forum has special requirements which I suggest you fill out.

Also, "plzz" is not a word.
# 3  
Old 08-16-2011
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to simulate ''Esc'' keystroke in a bash shel script?

I am using Ubuntu 12.4 I am running the following script: ++++++++ #!/bin/bash while ; do xdotool mousemove 248 539 click 1 & sleep 3 done +++++++++ This moves the mouse on the specified position on the screen and clicks that pauses the script for 3 seconds and repeats the... (2 Replies)
Discussion started by: alfarnume
2 Replies

2. Shell Programming and Scripting

Shell Script..plzz help

Hi all, if any body could help me out to automate the unix script for finding some particualar files which are based on dates like see every day i need check the TXT files which are being in processed and Sequential order based on dates For Example: files name starts at... (12 Replies)
Discussion started by: krux_rap
12 Replies

3. Shell Programming and Scripting

Not able to solve these questions plzz help

1.Display a list of /usr/share/doc subdirectories containing information about shells.How many README files do these subdirectories contain? Don't count anything in the form of "README.a_string". 2.Make a list of files in your home directory that were changed less that 10 hours ago, using grep,... (2 Replies)
Discussion started by: cynosure2009
2 Replies

4. Shell Programming and Scripting

need some clarification on for loop in shel script

for ( ( $i=0 ; $i<=6 ; $i++ ) ) do p=/RSA-Data/PE-data00"${i}" echo "$p" done --- i need output as below /RSA-Data/PE-data000 . . . /RSA-Data/PE-Data006 (1 Reply)
Discussion started by: mail2sant
1 Replies

5. Shell Programming and Scripting

script invoking shel script.

Hi, I have a shell script which will start a process in my prodution server. I want to write one more script as a cron job, which will start the first script at regular intervals. My question is what are the things I have to make sure to invoke the first script in second script. Can I... (3 Replies)
Discussion started by: pradeep_script
3 Replies

6. Shell Programming and Scripting

shell script & sqlplus "plzz help"

hi friends, i m tryin to load data from one set of table to other i have sql procedure al ready for it..! i m going to load the procedure only if data in one of my table for example table "landing " have 10 records each attribute of this table is file_name status date ... (2 Replies)
Discussion started by: kulbir
2 Replies

7. Shell Programming and Scripting

Shel program file handling

Hi, Iam having the file as follows: QWASEDRF1234567890098765 abc@quebex.com 000000000-932333 678394-56=3 9033894 QWASEDRF1234567890098765 abc@quebex.com 000000000-932333 678394-56=3 9033894 OPIUYTREE0986666544443322 dcsx@olivaa.net ... (14 Replies)
Discussion started by: nivas
14 Replies

8. Shell Programming and Scripting

Shel Script doesn't work from Exceed

Hi, I am using this script to load up my Oracle Databases, but when I log in through Exceed, it hangs. Can anyone tell me what else I need to add to make this work?? Details ****************************************************************************************************... (11 Replies)
Discussion started by: dnkansah
11 Replies

9. UNIX for Dummies Questions & Answers

problem with GREP, help plzz

I just want the output of this command to be stored in a variable like, str = `grep Application.dbName serverdata/ServerProp.txt` but while executing it says like, str : startup 11: not found, where startup is the script name. but while running the command alone like, grep... (2 Replies)
Discussion started by: cs_sakthi
2 Replies
Login or Register to Ask a Question