Question: 1)Write a bash script that will be taking an existing directory as an input, bash script must create three folders within that path called a,

1)Write a bash script that will be taking an existing directory as an input, bash script must create three folders within that path called a, b and c and perform following tasks: Task 1: store a hostname in a text file called hostname.txt in folder a. Task 2: store a structure of files in C:\ drive in file called c_files_strucrure.txt in folder b(tip ls command). Task 3: move folders a and b with their content to folder c.

2)Create a Bash script that will take 3 parameters. First parameter will be defining a path, if it doesnt exist it should be created, bash script should inform user about it. Second parameter will be an integer number x where x > 0 and x 0 and y <= 20. bash script should create x number of folders, folders should be named with ascending integer numbers starting at 1. Finally, bash script should create y number of files within each of the newly created folders, files should be named with ascending integer numbers starting at 1.

3)Write a bash script that will print, Message "Hello World", in Bold and Blink effect, and in different colours like red, brown etc using echo command.

4) Write a bash script to find out biggest number from given three numbers. Numbers are given as command line argument. Print error if sufficient arguments are not supplied.

5). Write a bash script that will add two numbers, which are supplied as command language argument, and if this two numbers are not given show error message.

6). Write a bash script to print numbers 5, 4, 3, 2, 1 using while loop.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!