
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
Question
4) Write a bash script to demonstrate until loop which displays "While Loop Demo" and exits when key q is typed.
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

Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question
commands not found
![[yyznana@toronto7670
~]$ untill false;
bash: untill: command not found...
[yyznana@toronto7670 ~]$ until false;
> do
> printf "WHILE LOOP DEMO"
> read -t 0.25 -N 1 input
> if [[$input ="q"]] || [[$input ="Q" ]];
> then
> echo
> break
> fi
> done
WHILE LOOP DEMObash: [[: command not found...
Similar command is: '['
bash: [[ command not found...
Similar command is: '['
WHILE LOOP DEMObash: [[: command not found...
Similar command is: '['
bash: [[ command not found...
Similar command is: '['
WHILE LOOP DEMObash: [[: command not found...
Similar command is: '['
bash: [[ command not found...
Similar command is: '['](https://content.bartleby.com/qna-images/question/7ecedc5d-b2c1-4f69-b362-47b7aca8dbea/9d380cef-4709-4605-bb1a-d3646e7bf5e4/cntbhn9_thumbnail.png)
Transcribed Image Text:[yyznana@toronto7670
~]$ untill false;
bash: untill: command not found...
[yyznana@toronto7670 ~]$ until false;
> do
> printf "WHILE LOOP DEMO"
> read -t 0.25 -N 1 input
> if [[$input ="q"]] || [[$input ="Q" ]];
> then
> echo
> break
> fi
> done
WHILE LOOP DEMObash: [[: command not found...
Similar command is: '['
bash: [[ command not found...
Similar command is: '['
WHILE LOOP DEMObash: [[: command not found...
Similar command is: '['
bash: [[ command not found...
Similar command is: '['
WHILE LOOP DEMObash: [[: command not found...
Similar command is: '['
bash: [[ command not found...
Similar command is: '['
Solution
by Bartleby Expert
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question
commands not found
![[yyznana@toronto7670
~]$ untill false;
bash: untill: command not found...
[yyznana@toronto7670 ~]$ until false;
> do
> printf "WHILE LOOP DEMO"
> read -t 0.25 -N 1 input
> if [[$input ="q"]] || [[$input ="Q" ]];
> then
> echo
> break
> fi
> done
WHILE LOOP DEMObash: [[: command not found...
Similar command is: '['
bash: [[ command not found...
Similar command is: '['
WHILE LOOP DEMObash: [[: command not found...
Similar command is: '['
bash: [[ command not found...
Similar command is: '['
WHILE LOOP DEMObash: [[: command not found...
Similar command is: '['
bash: [[ command not found...
Similar command is: '['](https://content.bartleby.com/qna-images/question/7ecedc5d-b2c1-4f69-b362-47b7aca8dbea/9d380cef-4709-4605-bb1a-d3646e7bf5e4/cntbhn9_thumbnail.png)
Transcribed Image Text:[yyznana@toronto7670
~]$ untill false;
bash: untill: command not found...
[yyznana@toronto7670 ~]$ until false;
> do
> printf "WHILE LOOP DEMO"
> read -t 0.25 -N 1 input
> if [[$input ="q"]] || [[$input ="Q" ]];
> then
> echo
> break
> fi
> done
WHILE LOOP DEMObash: [[: command not found...
Similar command is: '['
bash: [[ command not found...
Similar command is: '['
WHILE LOOP DEMObash: [[: command not found...
Similar command is: '['
bash: [[ command not found...
Similar command is: '['
WHILE LOOP DEMObash: [[: command not found...
Similar command is: '['
bash: [[ command not found...
Similar command is: '['
Solution
by Bartleby Expert
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
- Using the following data file (delimited by a space or tab) November 400January 200June 400March 200April 200May 300July 400August 300September 400February 300October 300December 200Write a bash script that will use a loop structure to process the data file line by line. Do not use the command awk. The script will send the output to a file in the following format:Month Sales-------- -------January 200February 300March 200April 200May 300June 400July 400August 300September 400October 300November 400December 200======Total show the totalAverage show the averagearrow_forward4. Fast in java coding please. Thank you File Encryption is the science of writing contents of a file in a secret code. Yourencryption program should work like a filter, reading the content of one file,modifying the data into a code, and then writing the coded contents out to a secondfile. The second file will be a version of the first file, but written in secretcode. Write a program to demonstrate the above working with binary files.arrow_forwardHW1 Instructions: Your homework must have a cover page contains homework number, your name and student id. Submit the code on word file or pdf file. Write your name and student id as comment in the code (see the example). 回HW1 * HW1.Program B// Name: Your name // ID : Your university ID Busing System; using System.Collections. Generic; using System. Linq; using System. Text; using System.Threading. Tasks; 6. 7. 8. 10 Bnamespace HW1 11 O references class Program { 12 13 re static void Main(string[] args) Submit screenshot after running the code for each part (The screenshot must have your name and ID, see the example). ON CAWINDOWS\system32\cmd.exe Name: Your name ID : Your university ID MENU 1. Show grades 2. Show average 3. Max grade 4. Min grade 5. Modify a grade 6. Search by ID 0. Exit Please enter your choice: Write a menu program in C# that manages students grades for one class. The program lets the user select from a list of options, and if the input is not one of the options,…arrow_forward
- Write a python script that opens a text file names.txt in "reading" mode, uses a for loop to scan the file, read each line and print it. screenshot of text file includedarrow_forwardAssessment Description Honors Students: Complete this assignment according to the directions provided in the "Honors Addendum," located in Class Resources. This activity has multiple parts. All parts must be completed prior to documentation submission. Part 1: Reading and Writing Text Files. In this activity, you will learn how to read and write text files using non buffered and buffered File I/O classes, then learn how to parse a String into tokens using the String split() method, and finally, how to handle exceptions using various approaches. Part 2: Reading and Writing JSON Files. In this activity, you will learn how to read, write, and serialize JSON files to and from Java Objects. Refer to the instructions within "Activity 4 Guide" to complete the assignment. APA style is not required, but solid academic writing is expected. This assignment uses a rubric. Please review the rubric prior to beginning the assignment to become familiar with the expectations for successful…arrow_forwardlines in grey can not be edited at start and end. new jave code must go in middle.arrow_forward
- I need help on my python assignment.arrow_forwardJava : Create a .txt file with 3 rows of various movies data of your choice in the following table format: Movie ID number of viewers rating release year Movie name 0000012211 174 8.4 2017 "Star Wars: The Last Jedi" 0000122110 369 7.9 2017 "Thor: Ragnarok" Create a class Movie which instantiates variables corresponds to the table columns. Implement getters, setters, constructors and toString. Implement 2 readData() methods : the first one will return an array of Movies and the second one will return a List of movies . Test your methods.arrow_forward9.9..arrow_forward
- Write a program that reads the strings from file SortedStrings. txt and report whether the strings in the files are stored in ascending order. If the strings are not sorted in the file, display the first two strings that are out of order.arrow_forwardWrite one line of code that reads a full line from a file with file handle fp into a string defined aschar line[256]. Do this using both fscanf and fgets.arrow_forwardFocus on Basic file operations, exception handlingCreate and save a file of the number below as module6data.txt: 26O76-9185-4485-95-3483-64-76-4189083-99-698-790-32-49-898579-285619-93-21-238251-80l62-78-87128-730-45-7328-5O-7063-36-720-76-24-590-548335-388-1429-351727-61-4249833879-803384196-944671876-63-3693-82-68-2069-57-84-29-177736-89-946210-69-43Write a program in python that will a. Open the file module6data.txtb. Create a second file named processed.txtc. Read the numbers from the first file one at a time. For each number write into thesecond file, if possible, itsi. square ii. square root.iii. reciprocal (1/number) each on a separate line.• Use a math module function for the square root.• Use exception handling to trap possible errors. Error messages should be reported to the screen.d. Report the number of items in the original file and the number that were successfully stored in the second file.e. Report the number (count) of each type of error: ValueError, ZeroDivisionError,…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