Can someone help me create this script(I'm a novice)


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Can someone help me create this script(I'm a novice)
# 1  
Old 01-30-2020
Can someone help me create this script(I'm a novice)

I've literally been handed this assessment for my course and the lecturer is of no help at all he's taught us virtually nothing would anyone be able to show me how the following script should look on Linux -

For this assignment you have to write a Linux Shell Script which will allow a user to carry out a selective backup of his/her files.

First of all you need to set up a directory in your user area called Outcome3.(I've already done this part)
Inside directory Outcome 3 use touch to create the following files:

afile, anyfile, anotherfile, afiletest, bfile, bfiletest, cfile, cfiletest (I've done this part also)

Your script will give the user a menu of options in order to assist with the back up. The choices given to the user are Backup all files or Backup selected files.

If user chooses to backup all file then the files should be backed up to a new subdirectory called AllBackUp which should be created within your script.

If user chooses to back up selected files then they must input files to be backed up in a specific format e.g all files starting with the letter "a" or all files ending with "test". These files should then be backed up to a new sub directory called SelectBackUp which should be created with your script (This is the part I'm struggling with writing the script as he has shown us nothing about script writing only advice he gave was go watch YouTube)
If anyone could help I would be greatly appreciative

Thanks
Andy
# 2  
Old 01-30-2020
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

10 More Discussions You Might Find Interesting

1. Homework & Coursework Questions

Create script to add user and create directory

first off let me introduce myself. My name is Eric and I am new to linux, I am taking an advanced linux administration class and we are tasked with creating a script to add new users that anyone can run, has to check for the existence of a directory. if the directory does not exist then it has... (12 Replies)
Discussion started by: pbhound
12 Replies

2. Programming

Novice in C needs help

Guys can you help me ? I'm novice in C but I have a lot of will to master C. Each gurney starts with first step O.K. My problem is to compare two integers entered by user I know how to set up conditions and problem is how to print correct value (grater number) // This program... (5 Replies)
Discussion started by: solaris_user
5 Replies

3. Shell Programming and Scripting

Need help with a little script - novice

I am just learning unix and need some help. I am trying to display all of the files I have modified within the last 24 hours and sort them from the most recently modified. I can't figure it out.. I've been using a lot of ls and find commands. Here are some things I've tried: find . -mtime -1 |... (4 Replies)
Discussion started by: mredwin3
4 Replies

4. UNIX for Dummies Questions & Answers

NEW to Unix (novice)

Heya all Im just reading up on the solaris o/s and unix and i just have the following qustions 1) is the solaris o/s the same as Unix if not how are they different - i.e. are they different operating systems? 2) Can the Unix be loaded from CD without affectin windows o/s just like linux... (2 Replies)
Discussion started by: new214
2 Replies

5. Solaris

New to solaris (novice)

Heya all Im just reading up on the solaris o/s and have a few questions regarding it: 1) is the solaris of free to use/download? if yes where? 2) Can the solaris o/s be loaded from CD without affectin windows o/s just like linux can? 3) what are the hardware requirements for using... (2 Replies)
Discussion started by: new214
2 Replies

6. Shell Programming and Scripting

Unix scripting-Need help-NOVICE -PLEASE HELP

I really want to get into unix scripting,work with RS6000 -AIX. How do i get started,what books are good for beginners,i am very desperate I have no programming background but ready to scrafice all my time in learning .please help. PLEASE,PLEASE PLEASE ,HELP.... Any advice will realy... (2 Replies)
Discussion started by: Ghanaman
2 Replies

7. Shell Programming and Scripting

Problem for novice

Hi, I am observing a problem wiht my script. I tokk that part and executed from the command prompt. Below is the command the error. CAn any one suggest what should be done here. if ($cnt -lt $maxcnt) then echo deepu fi ksh: 0: not found Thanks in advance (16 Replies)
Discussion started by: deepaksamuel
16 Replies

8. Linux

Hi I M Novice User

hi everyone i m a novice user . just want to know how to use this website and also learn unix from the basics. can any one help me please.... (2 Replies)
Discussion started by: MSK
2 Replies

9. Programming

novice student needs help

Help! I am very stuck!!! I have to produce a practical implementation of ONC RPC for an assignment and I do not know where to start. I hve done much searching on sun's site but everything is too complicated for someone with my limited knowledge. I only know the very basic unix commands and have... (1 Reply)
Discussion started by: karen79
1 Replies

10. Linux

Question From a Novice

HELLO GUYS, How u all guys doing?Recently I brought a system and installed Red Hat Linux in it. I have also got a network card. My question is can i connect NIC to my system and use it as a client? I really don't want to buy another system. I want to use this computer/system both as server and... (0 Replies)
Discussion started by: cyno
0 Replies
Login or Register to Ask a Question