
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
In Linux
When writing shell scripts, we rely on the echo command to display output and prompt users for input. We know that the echo command will display exactly what we type on the command line unless we specify otherwise. What would be the command and option we would use to display what shell we are running followed by two newlines?
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- You will develop a client side and a Servlet program that will work with a database. 1. The client (front end) should have a title "NJIT Credit Union", centered. 2. The client should have a background color. 3. The client should have a text field with label 'UserID' where user will enter userID (integer) and a Submit button with text "Submit". 4. An unsuccessful authentication should have a message printed on the screen, in red, stating that "Your authentication has failed, please try again.” (no pop up message). At this point the text field should get cleared and ready to accept a new input. Your program should not exit. 5. A successful authentication should be followed by a message on the screen, in green, stating that "Your authentication is successful" (no pop up message). 6. There should be two other text boxes with label "Deposit" and "Withdraw" where user will enter an amount (you should accommodate for decimals). These two text boxes should only be enabled after successful…arrow_forwardUNIX Systems Programming A snippet from a shell script is given below:line1 ... while read numline2 ...doline3 ...w[$i]=$numline4 ...i=$((i+1))line5 ...done < $1line6 ...echo ${w[*]}line7 ...echo ${#w[*]}If the numbers entered by the user are 1 3 5 7 9 <Ctrl-D> on separate lines :2a. What is printed (echo’ed) by the line 6 ? Answer:__________________________________________2b. What is printed (echo’ed) by the line 7 ? Answer:arrow_forwardA user belongs to a group that has all permissions on a file named linux.txt, but the user, as the owner of the file, has no permissions. Describe which operations, if any, the user/owner can perform on linux.txt. Which command can the user/owner give that will grant the user/owner all permissions on the file?arrow_forward
- WITH LINUX DO THE FOLLOWING: Please write a shell script called "greeting" that displays a greeting message "Hello, cfs264sp18?? (your login ID)!" with the current date in the format "yyyy-mm-dd" and the list of the users who are currently on the system. Please provide a title of "The users who are currently on the system" before listing those users. Please show me how to do this from start to finish, like which file and directory I need to use, or what commands to even create a greeting. Thank you.arrow_forwardAnswer the questions in Linux command 1. Create a single command to read a file called program.c and write a file called unreadable.c, by replacing all newlines and tabs with spaces, and replacing all multiple consecutive spaces with a single space. The result should still be a legal C program but not exactly readable. 2. Write a single shell command line, possibly consisting of multiple commands (separated by semicolons), that will create a file diffs.txt containing a list of all files found in my Documents directory that aren’t also found in yours. Assume your current working directory is your home directory.arrow_forwardDraw a picture with 9 little boxes and fill in the 1s and Os for the mode for a file with permission modes of rwxr-x-- X rw-r- - r - - rwxr-x - - X rw-rw - r - - rw-r- - r - -arrow_forward
- Write a shell script that allows the user to enter six numbers, and sends it to a file. After which, the script will then display it on the screen. Hint: Make sure the script "cleans up" before running again.arrow_forwardThis is regarding Linux System callsarrow_forwardWrite a shell script that prompts the user for a grade between 0 and 100. The shellscript should calculate the corresponding letter for this grade based on the followingcriteria:0–49 = F50–59 =D60–69 = C70–79= B80–100 = AEnsure that the shell script continues to prompt the user for grades until the userchooses to exit the shell script.arrow_forward
- How do you create a Pyton script? And what is a Pyton script? I’m doing this on IDLE Shell.arrow_forwarddo the following in the codeThe shell environment should contain shell=<pathname>/myshell where <pathname>/myshell is the full path for the shell executable (not a hardwired path back to your directory, but the one from which it was executed). #!/bin/bashflag=0echo "Welcome to myshell"while [[ $flag == 0 ]]doread -p "myshell > " str#spilliting the textIFS=' ' #setting space as delimiterread -ra ARR <<<"$str" #reading str as an array as tokens separated by IFScommand=0 # >>>>>>>>>>>>>>>>>>>>>>>>>> 1. cd <<<<<<<<<<<<<<<<<<<<<<<<<if [[ ${ARR[0]} == "cd" ]]thencommand=1word=$(echo ${ARR[@]} | wc -w) # after cd hav no argument then report to current directoryif [[ $word == 1 ]]thencd $PWDelseif [[ -d ${ARR[1]} ]]thencd ${ARR[1]}elseecho "[${ARR[1]}] path is not correct"fififi…arrow_forwardHow does the shell know that a file is executable when it establishes a new process to run a command? How does it tell the difference between a shell script and a file created by a compilation if it's executable? What is the proper order for checking the situations listed above?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education