Question

Please do it in LINUX! and please show your output as well! Thank you! Write a...

Please do it in LINUX! and please show your output as well! Thank you!

Write a simple shell script to move (rename) all *.PDF files under the current directory (if any) to *.pdf, e.g.,
move test.PDF to test.pdf
move hello.PDF.PDF to hello.PDF.pdf
move .hello.PDF.PDF to .hello.PDF.pdf
and report each action, otherwise just report there are no *.PDF files.

0 0
Add a comment Improve this question Transcribed image text
Know the answer?
Add Answer to:
Please do it in LINUX! and please show your output as well! Thank you! Write a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a bash shell script to carry out each of the following tasks: What to Do:...

    Write a bash shell script to carry out each of the following tasks: What to Do: a. Safe Delete: When you use the “rm” command in Linux, it will delete the specified files, with no chance for recovering them back later. Write a script (called srm) that will safely delete the files passed to it as command-line arguments. For example, typing the command: “srm file1 file2 file3”, the script shall not actually delete these files, but instead it shall move...

  • In this assignment, you will demonstrate your ability to write simple shell scripts. This is a...

    In this assignment, you will demonstrate your ability to write simple shell scripts. This is a cumulative assignment that will challenge you to pull together a variety of lessons from throughout the course. 2 The Assignment Every now and then, I find myself with a large number of files that have inappropriate extensions (the set of characters in the file name after the last :') that need to be changed. For example, a complicated C++ program, developed by someone on...

  • LINUX! In shell scripting if possible and show commands (please do not copy codes form others)...

    LINUX! In shell scripting if possible and show commands (please do not copy codes form others) Thank you! Write a simple test program to find out PIDs of ALL ancestor (i.e., parent, grandparent ) processes of the current process or a given process specified by a PID. A parent process's PID of a given process pid can be found in /proc/$pid/status

  • Linux / Unix: Please explain in details if you can. Thanks. Write find commands for the...

    Linux / Unix: Please explain in details if you can. Thanks. Write find commands for the following. No need to submit execution output. 3. To find all files from current directory that have not been modified in the past three days 4. To find all files from /bin that are owned by root 5. To find all files from /etc that have the inode number 87539084

  • Write a script named listEmptyDir.sh that will do the following: (a) take a name of a...

    Write a script named listEmptyDir.sh that will do the following: (a) take a name of a directory as a parameter; (b) loop through all files in this directory and display their names; (c) if a file is a directory and has no files in it (empty directory), add the name of this empty directory to the file EmptyDir.txt in your current directory. If the number of parameters is not 1 or a parameter is not a directory, display the “usage”...

  • Homework No.2 CSC 222 Write a shell script program called "countf.sh" that will count how many...

    Homework No.2 CSC 222 Write a shell script program called "countf.sh" that will count how many files or directories recursively. beside the file counts, also report how many files for each types (directory or regular files). It will either take arguments for specific directories and no argument. If no argument, it will read the current working directory as the starting point. Please also provide -h option to print out how to use your countf.sh program % ./countf.sh % ./countf.sh file1...

  • Revision Question 3 on Linux. Please explain the shell script commands in the context of post...

    Revision Question 3 on Linux. Please explain the shell script commands in the context of post execution. You have just logged in and have a directory called "novel" in your home directory containing the following files: chapter1.docx chapter2.docx chapter3.docx draft.pdf save where "save" is itself a directory and contains the files Attributes.txt draft.pdf.1 draft.pdf.2 draft.pdf.3 indexA.txt indexB.txt list1.txt list2.txt a) Describe the results you would expect when executing the following shell commands: i) ls novel/save/*A* ii) ls novel/*r[23]* iii) rmdir...

  • (In Linux) 1. Create a file to write to from your script and save it as...

    (In Linux) 1. Create a file to write to from your script and save it as “.txt”. 2. Write the following information to the file that you created in Step 1: Today's date Your full name Your student ID The name of your course What directory you are in File permissions of the file that you created that allow everyone to read, write, and execute The long list of files in your current directory, providing all items and their process...

  • Linux/Fedora: Write the commands required for the following tasks. Try out each command on your system...

    Linux/Fedora: Write the commands required for the following tasks. Try out each command on your system to ensure that it is correct: a. Make a hierarchical directory structure under /root that consists of one directory containing three subdirectories. b. Copy two files into each of the subdirectories. c. Create one more directory with three subdirectories beneath it and move files from the subdirectories containing them to the counterparts you just created. After you have completed these three steps at the...

  • You are required to develop a simple Linux shell in C language “shell.c". The shell has...

    You are required to develop a simple Linux shell in C language “shell.c". The shell has to perform the following requirements: - - The shell prompt is “"myshell>". - Run commands either from current directory or from “/bin" directory using the "exec" system call. - Support output redirection like "command> filename" using "dup" system call. Note: save the output of the comment in the (filename). - Implement the “history shell command to list the last ten commands entered so far....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT