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
Please use these commandswithin the .sh file
sort -M .. to a temp file
awk….. the sorted temp file
rm .. temp file from sort command.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 1 images
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
- please help in this ASAParrow_forwardWhich sort usually requires fewer data values to be swapped, bubble sort or selection sort?arrow_forwardPlease help write the functions (context for the problem in the images): write_X_to_map(filename, row, col): Takes as inputs a string corresponding to a filename, and two non-negative integers representing a row and column index. Reads in the map at the given filename, inserts an X into the given row and column position, then saves the map to a new file with 'new_' prepended to the given filename. You can assume the filename given to the function as argument refers to a file that exists.arrow_forward
- Write a function that reads all the numbers from a file into an array. The file is already open and there is no bad data in the file. The data is one number per line and an unknown number of lines of data. The function should read data until either end of file is detected or the array is full. Prototype void readData( ifstream& iFile, double numbers[ ], int size, int& count); iFile - already open ifstream numbers[ ] - array to store data size - the size of the array. count - the number of values read and must be set by the function before returning. HTML EditorKeyboard Shortcutsarrow_forwardplease provide code and explanation with output (list student)arrow_forwardNeed answer urgent within 30 minutesarrow_forward
- Computer Science Using Java, write a simple Insertion Sort program that can read in integers from a text file (line by line) and sort them into another text file. Use inFile and outFile for the input and output files, respectively. Also make sure that the algorithm keeps track of the comparisons and exchanges performed by the sort so that they may be printed out in the console after the sort is completedarrow_forwardZoo Melaka has three tigers and to ensure these tigers have the correct diet, the zookeeper need to analyse the amount of foods each tiger eats. The quantity of food eaten by each tiger should be read from the food.txt file. You need to read and assign all the data from the input file to two-dimensional array (3 x 7) where each row represents a different tiger and each column represents day of the week.Create a report that includes the following information:i. Average amount of food eaten per day by all the tigers.ii. The minimum amount of food eaten during the week by any one tiger.iii. The maximum amount of food eaten during the week by any one tigerarrow_forwardBy using C programming language. Write a program which reads a list of 10 words from a file, sorts them, then prints out the sorted list. Words should be guaranteed to be less than 32 characters long, and one per line in the file. Get the name of the file as a command line parameter. Sort order is what strcmp() delivers. Make up your own list of words. Bubble sort is recommended.arrow_forward
- I Need help with this C language program! I can't use the 'make' command to combine the files together to create a "sort158a" program to execute. There might be an error to the make file, please check carefully, which I have provided. Here is the updated code: sort158a.c:#include <stdio.h>#include <stdlib.h>#include <mergesort.h> int main(void){ int sz, key[] = { 4, 3, 1, 67, 55, 8, 0, 4, -5, 37, 7, 4, 2, 9, 1, -1 }; int n = sizeof(key) / sizeof(int); /* the size of key [] */ int i; /*remove first 4 elements from key [] */ for(i = 4; i < n; i++) { key[ i - 4] = key[i]; } sz = n - 4; /* Update the size of key [] */ wrt(key, sz); /* Print the contents of the orginal array */ mergesort(key, sz); /* Sort the array using mergesort */ printf("After mergesort:\n"); /*prints "After mergesort:"*/ wrt(key, sz); // Print the contents of the sorted array /* Restore first 3 elements in key[] */ key[0] = 4;…arrow_forwardHowever, the number of integers must be a power of 2. In main.c, key[ ] has 16 integers. But as you should alreadyknow, the program will not sort if one integers is removed or added. What you are going to do is modify the mergesort.c module so that a non-power of 2 number of integers can be sorted. When you modify a module, indicate by way of comment, what was changed, the date the change was made. You will also need to add or remove an integer to/from key[] in module sort158a.c.You are NOT allowed to change merge.c, mergesort.h or wrt.c filesThe mergesort function in file mergesort.c MUST call the merge function which it currently does.The main function in sort158a.c you can only change the number of integers in the key[] arrayBelow are 3 examples of output. The first with an array of 15 integers. The second with an array of 16 (power of 2) integers and the third with 17 integers.Example of Output with 15 integersBefore mergesort: 4 3 1 67 55 4 -5 37 7 4 2 9 1 -1 6After mergesort: -5…arrow_forwardPlease help me write the following function (see the photos for context of the problem): follow_trail(filename, treasure_map, start_row, start_col): Takes as inputs a string corresponding to a filename, a list of lists corresponding to a treasure map, and two non-negative integers representing a row and column index. Follows the trail in the given treasure map, starting at the given row and column index. Following the trail means to look at each character of the trail and perform the appropriate operation for that character: '>', '<', 'v', ' ∧': Continues following the trail by moving to the character to the right, left, below or above the current trail character, respectively. '.': Creates a new map file, with 'new_' prepended to the current map filename, and stores the same treasure map but with an X at the current position. Then, returns a tuple of three elements: the first being -1, and the latter two being the current row and column index. '*': Returns a tuple of three…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