Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

UNIX/LINUX QUESTIONS. Please solution only! Thanks. 1. Write a PERL subroutine or function named Greetings that displays a simple hello message. Demonstrate that the function

UNIX/LINUX QUESTIONS. Please solution only! Thanks.

1. Write a PERL subroutine or function named Greetings that displays a simple hello message. Demonstrate that the function works by invoking it to show its output.

2. In Linux, the PATH (Sobell, page 308) keyword variable specifies the directories in the order Bash should search them when it searches for a script or program you run from the command line. In PERL, what would be the value of your PATH variable? What happens when you put the statement echo $PATH in the PERL Subroutine created in the previous question, such as in BASH as shown below.

3. Re-write the BASH script below in PERL and run your program to show if your output works properly. The script copies a given file name into itself (same name) followed by an extension of .bak, such as file-1 to file-1.bak when you call the script with file-1 as the first argument (source file) and file-1 as the second argument (the destination file). Before trying to copy the source file into the destination file, it first checks if the file exists in the directory and is writable and displays the appropriate message for each operation.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 11G SQL

Authors: Joan Casteel

2nd Edition

1133947360, 978-1133947363

More Books

Students also viewed these Databases questions

Question

=+5 How does HRM relate to efforts to increase innovation?

Answered: 1 week ago