OPS102 - Week 3 - Lab
.docx
keyboard_arrow_up
School
Seneca College *
*We aren’t endorsed by this school
Course
102
Subject
Computer Science
Date
Apr 3, 2024
Type
docx
Pages
13
Uploaded by ColonelDiscovery13270 on coursehero.com
OPS102 – Week 3 – File Systems - Sample Lab
Student Name: <Elsa Koci>
Student ID: <148757230>
Activity 1: File Globing
When issuing Linux or Windows commands, it may be more efficient
(less typing) to use filename expansion symbols also called
File Globing
to match files that share similar characteristics (e.g. same file extension) when issuing Linux commands. Example
:
You can use a special character to indicate to the Bash shell to match all files that end
with the extension ".txt" in your current working directory: ls *.txt
a.txt b.txt c.txt 1.txt 2.txt 3.txt abc.txt work.txt Below are the most common Filename Expansion symbols and how they are used for filename expansion: Filename
Expansion
Symbol
Purpose
*
Asterisk (*) to represent 0 or more characters
?
Question mark (?) to represent exactly one character (any character)
[ ]
Square brackets ([ ]) to represent and match for the character enclosed within the square brackets
.
It represents ONLY ONE character - it's like a
Question Mark (?)
but with conditions or restrictions. [! ]
Square brackets containing an exclamation mark immediately after
the open square bracket ([! ]) to represent and match and
OPPOSITE
character for the character enclosed within the square brackets.
Consider following file hierarchy for the activities in this section. This applies to both of Linux and Windows.
You will now get practice issuing file management commands using filename expansion symbols
. We will be using the directory structure given above. A great way to practice filename expansion, use the touch
command on Linux to create a lot of empty filenames (for windows use any preferred way to create such files.), write the ls/dir commands that use filename expansion
, predict the filenames that will be display, and finally run the command to check your work.
Perform the following steps for Linux and repeat them for windows using equivalent commands learnt previously: 1.
Issue a Linux command to move to the examples
directory
(i.e. under practice
directory as shown in diagram to the right).
2.
Issue a Linux command to confirmed that you have moved to the examples
directory.
3.
Issue the touch
command to create the following empty text files in the examples
directory:
(note upper
and lowercase
letters)
abc.txt
def.text
hij.TxT
1a4.txt
123.TXT
456.txt
6u9.txt
ab2.html
1234.txt
abcdef.txt
abcde.txt
4.
If you encounter errors, then make corrections (eg. viewing directory contents
, check for correct filename syntax
, case sensitivity
, missing files
, files in the wrong location
, etc.) 5.
Issue the ls
command to get a listing of files in your examples
directory.
The output should look identical to the diagram displayed below.
You can refer to this listing to see all files so you can then predict the output from Linux commands that use filename expansion symbols.
Figure 1. Linux: Creating Directories and Files
Figure 2. Windows: Creating Directories and Files
6.
What do you think the output will be from the following Linux command?
ls ???.txt
Write down the expected output
on paper, then issue the command
to check your answer.
1a4.txt 456.txt 6u9.txt abc.txt 7.
What do you think the output will be from the following Linux command?
ls ?????.txt
Write down the expected output
on paper, then issue the command
to check your answer.
1234.txt 8.
What do you think the output will be from the following Linux command?
ls ??????.txt
Write down the expected output
on paper, then issue the command
to check your answer.
abcdef.txt
9.
What do you think the output will be from the following Linux command?
ls [0-9].txt
Write down the expected output
on paper, then issue the command
to check your
answer.br>Did the command work? NO
What does this teach you about the character class [ ] symbol?
The expected output: No such file or directory.
In the above case, should be displayed all files whose name contains only one character in the interval [0-9]. Since we do not have such a named file, the command will not work.
10. What do you think the output will be from the following Linux command?
ls [0-9][0-9][0-9].txt
Write down the expected output
on paper, then issue the command
to check your answer.
456.txt 11. What do you think the output will be from the following Linux command?
ls [a-z][a-z][a-z].txt
Write down the expected output
on paper, then issue the command
to check your answer.
abc.txt
12. What do you think the output will be from the following Linux command (using character class with UPPERCASE letters)?:
ls [A-Z][A-Z][A-Z].txt
Write down the expected output
on paper, then issue the command
to check your answer.
“No such file or directory”
13. What do you think the output will be from the following Linux command (using character class using alpha-numeric characters)?
ls [a-zA-Z0-9][a-zA-Z0-9][a-zA-Z0-9].txt
Write down the expected output
on paper, then issue the command
to check your answer.
1a4.txt 456.txt 6u9.txt abc.txt 14. What do you think the output will be from the following Linux command?
ls *.txt
Write down the expected output
on paper, then issue the command
to check your answer. Did ALL text files get listed? Why not?
1234.txt 1a4.txt 456.txt 6u9.txt abc.txt abcde.txt abcdef.txt Not all text files are listed, but only those with the suffix “.txt”.
15. What do you think the output will be from the following Linux command?
ls *.[tT][xX][tT]
Write down the expected output
on paper, then issue the command
to check your answer. Did ALL text files get listed this time? If so, why?
123.TXT 1234.txt 1a4.txt 456.txt 6u9.txt abc.txt abcde.txt abcdef.txt hij.TxT
Only 2 files are not listed: ab2.html and def.text. This is because the command only lists files that have the suffix .txt (where the letters of the suffix can be uppercase or lowercase).
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
Use Linux executable objectCode5 for this question. These files are on syccuxas01.pcc.edu in directory ~michael.trigoboff/cs201/quiz02LinuxFiles.
The file is run from the Linux command line, and takes one positive numerical argument, like this:
./objectCode5 3
(You can enter any small positive integer instead of 3.)
Command line arguments are passed to int main(int argc, char** argv) as arguments argc and argv. You should assume that argc is at ebp+8 and argv is at ebp+12.
This code contains a function named what. Using gdb, figure out what the function named what computes:
Question options:
1)
the absolute value of n
2)
n squared
3)
the sum of the integers from 1 through n
4)
factorial of n
arrow_forward
Simple SHELL (.sh) script
Write a SHELL script (minExF.sh) that takes a csv file ("Comma Separated Values", a text file that can be manipulated by Excel) as an argument containing the grades of the mid-term (called intra) exams with the passing thresholds and calculates the minimum grades that must be obtained in the Final exam by adding them as a column to the initial information in the output file.
Note: To manipulate large integers and real numbers use the Unix command bc . Here is an example of how to use of this command to add two non-integer numbers stored in the variables VAR1 and VAR2 :
VAR1=5.5VAR2=3.14159RESULT='echo $VAR1+$VAR2 | bc'echo $RESULT
The result displayed on the screen will be 8.64159.
The first line contains titles (mid-terms, weight mid-term, weight final, treshold). The following lines contain information about the Intra (mid-term) exam scores, exam weights and weighting of the exams and the cut-off points for the two exams, Intra (mid-term) and Final.
arrow_forward
Hello! I have an assignment for my linux class and I am having some difficulty with the last question which was a challenge to me:
Here is the last bit of homework
CHALLENGE: Your job is to create a booklet (i.e. a printable file) that contains the name of every header file on the system followed by a 1-line description of the purpose of that file. (Hint: the first line of the .h file has a description). Each file name and description set should be followed by a blank line before the next file name entry in this file.
Example file entry: (shown on picture attached)
I am really desperate as I have tried everything it doesn't seem to go through.
arrow_forward
Please complete these files. There are two text files attached. Running the code should result in the creation of an output file ("PE_output.txt"). Please give full reasoning to the answer. Please also paste the full java code and please attach a screenshot of the successful program run.
package solution;
import java.io.*;import java.util.Scanner;
public class PE_1_problem {@SuppressWarnings("resource")public static String readFirstLetters(String filename) {String result = "";File f = new File(filename);// Surround the next command inside a try/catch block,// as it is possible the file doesn't exist.try {Scanner fileContents = new Scanner(f);while (fileContents.hasNextLine()) {// 1. Get the next line and store in a variable// 2. Check the length of the line. If the line is not an// empty string, add the character at the start of the line// to the result string.// 3. Otherwise, add an empty space to the result string.}fileContents.close();} catch (FileNotFoundException e) {…
arrow_forward
(Linux) Your task is to write a script called process_files that will accept from the user as command line arguments a series of 3 strings representing file types. You must then create 4 directories – one for each file type and one for any files that do not match any of the file types - and separate the files into these new directories then return some information about these files to the user. For example if the user types process_files jpg gif docx Your script will sort the jpg/jpeg, gif and doc/docx files into their appropriate directories
arrow_forward
Consider the file named Plans on a Linux system. This file is owned by the user named "mary", who belongs to the "staff" group.
---xrw--wx 1 mary staff 1000 Apr 4 2020 Plans
(a) Can Mary read this file? [ Select ] ["Yes", "No"]
(b) Can any other member of the "staff" group read this file? [ Select ] ["Yes", "No"]
(c) Can any other member of the "staff" group execute this file? [ Select ] ["No", "Yes"]
(d) Can anyone not in the "staff" group read this file? [ Select ] ["Yes", "No"]
(e) Can anyone not in the "staff" group write this file? [ Select ] ["No", "Yes"]
arrow_forward
The following shell script adds entries to a file named journal-file in your home directory. This script helps you keep track of phone conversations and meetings.
$ cat journal
# journal: add journal entries to the file
# $HOME/journal-file
file=$HOME/journal-file
date >> $file
echo -n "Enter name of person or group: "
read name
echo "$name" >> $file
echo >> $file
cat >> $file
echo "----------------------------------------------------" >> $file
echo >> $file
What do you have to do to the script to be able to execute it?
Why does the script use the read builtin the first time it accepts input from the terminal and the cat utility the second time?
arrow_forward
In Unix/Linux code:
Write cmd lines for the following.1. Display lines that begin with upper case and end with lower case among the lines in a text file. Use any filename for your answer.2. Display shell programming scripts in /etc/init.d3. Is [] bracketed expression used in shell scripts under /etc/init.d ? Write a cmd line to evaluate this.Display all lines in all files in /etc/init.d which contains the pattern [] for test cmd
arrow_forward
using Java build Login/Sign up system using binary files** and Gui using Java swing/AWT**; in other words 1. the user should be able to write data in the sign up field ( such as name, password, age ..)2. the entered data should be saved in a binary file then ... 3. when the user tries to login, the system should read from the binary file and compare it with the entered data to check if it exists 4. if it doesn't exist don't allow him to enter-----------------------------------------------------------------please use ****JAVA , BINARY FILES , SWING OR AWT for the gui ONLY**** any other options aren't allowed ----------------------------------------------------------------that
arrow_forward
Answer 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_forward
Python question: I have a .py file in another folder in the same directory how do I import that file into another .py file?
For example, my directory folder is called "School_Work"
I have 2 folders:
Helper_Functions
Main_Driver
In my Helper_Functions folder I have the file called helper_functions.py and in my main driver I have a file called main.py. I want to import helper_functions.py into main.py. How do I do that?
arrow_forward
You have been hired at an open-air mine. You are to write a program to control a digger. Foryour task, you have been given a `map' of all the underground resources in the mine. This mapcomes as a file. The file has n rows. Each row has n space-separated integers. Each integer isbetween zero and one hundred (inclusive). The file should be understood to represent a grid, nwide by n deep. Each square in the grid can contain valuable resources. The value of theseresources can go from zero (no resources) to 100 (max resources).The grid maps the resources just below the surface, and down to the lowest diggable depths.The digger starts at the surface (so, just on top of the topmost row in the grid)—at anyhorizontal position between 1 and n. The digger cannot dig directly downwards, but it can digdiagonally in either direction, left-down, or right-down. In its first time-step, it will dig onto thefirst row of the grid. In its second time-step, it'll hit the second row, and so on. When the…
arrow_forward
write c program? plz single c file
write a program that will copy all files under the given folder to another one. In order to be able to complete this assignment, you have to research how to obtain the list of files in a directory in Linux. You must copy each file in a separate process. The folder name should be obtained from the arguments. You must perform all error checks?
arrow_forward
Nobody has understood the question thus far.
Please read. It's Java.
Write a client program and server program. The server uses a socket connection to allow a client to supply a filename and the server will send the file contents to the client or an error message if the file does not exist. The client will create a new file with the same contents. The client will supply the filename "input.txt" to the server and create as it's output "output.txt". Don't ask the user for these names. The Server sends whatever file the Client requests. Don't put "input.txt" in the Server. The client must get the contents from the Server. It must not read input.txt directly.
Do not accept arguments from the command line.
One class named Server and one named Client. These must be the ONLY 2 CLASSES
arrow_forward
Suppose you want to back up a huge file (e.g., a 10-GB AVI file) to aCD-R. You can achieve it by splitting the file into smaller pieces and backing upthese pieces separately. Write a utility program that splits a large file into smallerones using the following command:java Exercise17_10 SourceFile numberOfPiecesThe command creates the files SourceFile.1, SourceFile.2, . . . , SourceFile.n,where n is numberOfPieces and the output files are about the same size.
arrow_forward
Unix/Linux Quiz Questions:
Question 1:
Here is a file named phone.book:
Bill:Gates:800-555-1212:bill@microsoft.com
Elon:Musk:650-94301:tesla.com
Joe:Biden:800-999-9000:president@whitehouse.gov
Jay:Leno:800-123-8888:jay@nbc.com
Steve:Jobs:408-101-1011:jobs@apple.com
Write a command that will add a name, phone number, and email address (you can make them up) to the file phone.book. Then write a separate command that will list the phone.book file on your terminal in order by last names, and with the fields separated by multiple spaces or tab characters.
arrow_forward
Write a program that performs the following operations according to the input value with Linux Bash Script.
[1] Create a file for a given filename and list the generated file in a long format
[2] Delete a file for a given filename
[3] Copy a file content to another file
[4] Listsubdirectories of a current directory recursively
[5] Generate the command that finds how many times the "cat" command has been used in your command history so far.
[6] Generate the command that writes the file names starting with W in the active directory to the "Files.txt" file.
should be solved using Linux Bash Scripting
solution code and one/two screenshots for running of program.
arrow_forward
JAVA PROGRAM ASAP
The program does not run in hypergrade can you please MODIFY THIS program ASAP BECAUSE it does not pass all the test cases when I upload it to hypergrade. I have provided the correct test cases as a screenshot as well as the failed test cases. It says 0 out of 4 passed. The program must pass the test case when uploaded to Hypergrade.
Files data are down below:
text1.txt
StopAndSmellTheRoses.
text2.txt
ATrueRebelYouAre!EveryoneWasImpressed.You'llDoWellToContinueInTheSameSpirit.PleaseExplainABitMoreInTheWayOfFootnotes.FromTheGivenTextIt'sNotClearWhatAreWeReadingAbout.
import java.io.BufferedReader;import java.io.FileReader;import java.io.IOException;import java.util.Scanner;class Main { // Driver code public static void main(String[] args) { // scanner object used to take user input Scanner sc = new Scanner(System.in); // loop iterates until user enters "quit" or "QUIT" while (true) { System.out.print("Please enter…
arrow_forward
You work for a small company that keeps the following information about its clients:• first name• last name• a 5-digit user code assigned by your company.The information is stored in a file clients.txt with the information for each client on one line(last name first), with commas between the parts. For exampleJones, Sally,00345Lin ,Nenya,00548Fule,A,00000Smythe , Mary Ann , 00012Your job is to create a program assign usernames for a login system.First: write a function named get_parts(string) that will that will receive as its arguments astring with the client data for one client, for example “Lin ,Nenya,00548”, and return theseparate first name, last name, and client code. You should remove any extra whitespace from thebeginning and newlines from the end of the parts.You’ll need to use some of the string methods that we covered in this lessonYou can test your function by with a main() that is just the function call with the argument typed in.Second: write a function make_user(param)…
arrow_forward
C++ PLEASE!!
Working on a project that is about word count with MapReduce, need a file manager class to take care of reading all txt file from a directory with giving path.
The file manager class need to open the directory with the giving path which the user will input, then open the path and open all the txt files in that directory and break the text into single line and pass it to another class to do mapping.
Please help with the file manager class!! Thank you!!
arrow_forward
Please read. It's Java.
Write a client program and server program. The server uses a socket connection to allow a client to supply a filename and the server will send the file contents to the client or an error message if the file does not exist. The client will create a new file with the same contents. The client will supply the filename "input.txt" to the server and create as it's output "output.txt". Don't ask the user for these names. The Server sends whatever file the Client requests. Don't put "input.txt" in the Server. The client must get the contents from the Server. It must not read input.txt directly.
Do not accept arguments from the command line.
One class named Server and one named Client. These must be the ONLY 2 CLASSES
arrow_forward
Question 1BackgroundYou are required to write program that will read a file, encrypt the content of the file, and thencreate a new file that contains the encrypted content.Your program will make use of the following classes:Page – This class will be used to represent the content of the file that was read.PageManager – This class will be used to read page content from and to a file.APM11A1Encryptor – This class will be used to encrypt the content of a file using the Caesar-Ciphermethod.APM11A1 - AdvancedProgrammingAdvancedAPM11A1Encryptor – This class will be used to encrypt the content of a file using theExclusive-OR method.Caesar CipherCaesar was a Roman military and political leader during 100BC to 44BC. In order to make thecommunication channels secure during war, he invented an encryption technique called the CaesarCipher. The cipher requires a sentence and a key to function properly. Each character in the sentencewas then shifted according to the value of the key. Computer…
arrow_forward
IN PYTHON please,
Attached to the assignment is a test file: lesson4_folderexample.txt Download lesson4_folderexample.txt
-
External clients have added spaces throughout the folder names by: internal
workflow conflict, user mistake, etc
-
We determined the only issue is that there are spaces, but need to confirm which
folders
-
Write a script that removed all spaces, reports the fixed string, and reports on console which ones needed fixing and which were fine.
.....................................................................................................................................................................................................................
This is inside the txt file:
/offsideStorage1/production/star wars/reel1/partA/1920x1080
/offsideStorage4/production/starwars/reel - - 1/VFX/Hydraulx
/offsideStorage1/production/starwars/reel1/partB/pickups/1920x1080
/offsideStorage1/production/starwars/reel1/VFX/ Framestore…
arrow_forward
Bash Shell Script Programming Assignment
Question 1.
Create a shell script file called q1.sh
Write a script that would accept the two strings from the console and would display a message stating whether the accepted strings are equal to each other.
Question 2.
Create a shell script file called q2.sh
Write a bash script that takes a list of files in the current directory and copies them as into a sub-directory named mycopies.
Question 3.
Create a shell script file called q3.sh
Write a Bash script that takes the side of a cube as a command line argument and displays the volume of the cube.
Question 4.
Create a shell script file called q4.sh
Write a Bash script that prompts you for a user name and displays the corresponding user’s id number (UID), group id number (GID), and his/her home directory. Note: this information can be found in the /etc/passwd file.
Question 5.
Create a shell script file called q4.sh
Write a bash script that will edit the PATH environment variable…
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
Computer Science
ISBN:9781337569798
Author:ECKERT
Publisher:CENGAGE L
Related Questions
- Use Linux executable objectCode5 for this question. These files are on syccuxas01.pcc.edu in directory ~michael.trigoboff/cs201/quiz02LinuxFiles. The file is run from the Linux command line, and takes one positive numerical argument, like this: ./objectCode5 3 (You can enter any small positive integer instead of 3.) Command line arguments are passed to int main(int argc, char** argv) as arguments argc and argv. You should assume that argc is at ebp+8 and argv is at ebp+12. This code contains a function named what. Using gdb, figure out what the function named what computes: Question options: 1) the absolute value of n 2) n squared 3) the sum of the integers from 1 through n 4) factorial of narrow_forwardSimple SHELL (.sh) script Write a SHELL script (minExF.sh) that takes a csv file ("Comma Separated Values", a text file that can be manipulated by Excel) as an argument containing the grades of the mid-term (called intra) exams with the passing thresholds and calculates the minimum grades that must be obtained in the Final exam by adding them as a column to the initial information in the output file. Note: To manipulate large integers and real numbers use the Unix command bc . Here is an example of how to use of this command to add two non-integer numbers stored in the variables VAR1 and VAR2 : VAR1=5.5VAR2=3.14159RESULT='echo $VAR1+$VAR2 | bc'echo $RESULT The result displayed on the screen will be 8.64159. The first line contains titles (mid-terms, weight mid-term, weight final, treshold). The following lines contain information about the Intra (mid-term) exam scores, exam weights and weighting of the exams and the cut-off points for the two exams, Intra (mid-term) and Final.arrow_forwardHello! I have an assignment for my linux class and I am having some difficulty with the last question which was a challenge to me: Here is the last bit of homework CHALLENGE: Your job is to create a booklet (i.e. a printable file) that contains the name of every header file on the system followed by a 1-line description of the purpose of that file. (Hint: the first line of the .h file has a description). Each file name and description set should be followed by a blank line before the next file name entry in this file. Example file entry: (shown on picture attached) I am really desperate as I have tried everything it doesn't seem to go through.arrow_forward
- Please complete these files. There are two text files attached. Running the code should result in the creation of an output file ("PE_output.txt"). Please give full reasoning to the answer. Please also paste the full java code and please attach a screenshot of the successful program run. package solution; import java.io.*;import java.util.Scanner; public class PE_1_problem {@SuppressWarnings("resource")public static String readFirstLetters(String filename) {String result = "";File f = new File(filename);// Surround the next command inside a try/catch block,// as it is possible the file doesn't exist.try {Scanner fileContents = new Scanner(f);while (fileContents.hasNextLine()) {// 1. Get the next line and store in a variable// 2. Check the length of the line. If the line is not an// empty string, add the character at the start of the line// to the result string.// 3. Otherwise, add an empty space to the result string.}fileContents.close();} catch (FileNotFoundException e) {…arrow_forward(Linux) Your task is to write a script called process_files that will accept from the user as command line arguments a series of 3 strings representing file types. You must then create 4 directories – one for each file type and one for any files that do not match any of the file types - and separate the files into these new directories then return some information about these files to the user. For example if the user types process_files jpg gif docx Your script will sort the jpg/jpeg, gif and doc/docx files into their appropriate directoriesarrow_forwardConsider the file named Plans on a Linux system. This file is owned by the user named "mary", who belongs to the "staff" group. ---xrw--wx 1 mary staff 1000 Apr 4 2020 Plans (a) Can Mary read this file? [ Select ] ["Yes", "No"] (b) Can any other member of the "staff" group read this file? [ Select ] ["Yes", "No"] (c) Can any other member of the "staff" group execute this file? [ Select ] ["No", "Yes"] (d) Can anyone not in the "staff" group read this file? [ Select ] ["Yes", "No"] (e) Can anyone not in the "staff" group write this file? [ Select ] ["No", "Yes"]arrow_forward
- The following shell script adds entries to a file named journal-file in your home directory. This script helps you keep track of phone conversations and meetings. $ cat journal # journal: add journal entries to the file # $HOME/journal-file file=$HOME/journal-file date >> $file echo -n "Enter name of person or group: " read name echo "$name" >> $file echo >> $file cat >> $file echo "----------------------------------------------------" >> $file echo >> $file What do you have to do to the script to be able to execute it? Why does the script use the read builtin the first time it accepts input from the terminal and the cat utility the second time?arrow_forwardIn Unix/Linux code: Write cmd lines for the following.1. Display lines that begin with upper case and end with lower case among the lines in a text file. Use any filename for your answer.2. Display shell programming scripts in /etc/init.d3. Is [] bracketed expression used in shell scripts under /etc/init.d ? Write a cmd line to evaluate this.Display all lines in all files in /etc/init.d which contains the pattern [] for test cmdarrow_forwardusing Java build Login/Sign up system using binary files** and Gui using Java swing/AWT**; in other words 1. the user should be able to write data in the sign up field ( such as name, password, age ..)2. the entered data should be saved in a binary file then ... 3. when the user tries to login, the system should read from the binary file and compare it with the entered data to check if it exists 4. if it doesn't exist don't allow him to enter-----------------------------------------------------------------please use ****JAVA , BINARY FILES , SWING OR AWT for the gui ONLY**** any other options aren't allowed ----------------------------------------------------------------thatarrow_forward
- Answer 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_forwardPython question: I have a .py file in another folder in the same directory how do I import that file into another .py file? For example, my directory folder is called "School_Work" I have 2 folders: Helper_Functions Main_Driver In my Helper_Functions folder I have the file called helper_functions.py and in my main driver I have a file called main.py. I want to import helper_functions.py into main.py. How do I do that?arrow_forwardYou have been hired at an open-air mine. You are to write a program to control a digger. Foryour task, you have been given a `map' of all the underground resources in the mine. This mapcomes as a file. The file has n rows. Each row has n space-separated integers. Each integer isbetween zero and one hundred (inclusive). The file should be understood to represent a grid, nwide by n deep. Each square in the grid can contain valuable resources. The value of theseresources can go from zero (no resources) to 100 (max resources).The grid maps the resources just below the surface, and down to the lowest diggable depths.The digger starts at the surface (so, just on top of the topmost row in the grid)—at anyhorizontal position between 1 and n. The digger cannot dig directly downwards, but it can digdiagonally in either direction, left-down, or right-down. In its first time-step, it will dig onto thefirst row of the grid. In its second time-step, it'll hit the second row, and so on. When the…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.Computer ScienceISBN:9781337569798Author:ECKERTPublisher:CENGAGE L
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
Computer Science
ISBN:9781337569798
Author:ECKERT
Publisher:CENGAGE L