Computer Systems: A Programmer's Perspective (3rd Edition)
Computer Systems: A Programmer's Perspective (3rd Edition)
3rd Edition
ISBN: 9780134092669
Author: Bryant, Randal E. Bryant, David R. O'Hallaron, David R., Randal E.; O'Hallaron, Bryant/O'hallaron
Publisher: PEARSON
bartleby

Videos

Textbook Question
Book Icon
Chapter 8, Problem 8.20HW

Use execve to write a program called my1s whose behavior is identical to the /bin/ is program. Your program should accept the same command-line arguments, interpret the identical environment variables, and produce the identical output.

  The 1s program gets the width of the screen from the COLUMNS environment variable. If COLUMNS is Unset, then 1s assumes that the screen is 80 columns wide. Thus, you can check your handling of the environment variables by setting the COLUMNS environment to something less than 80:

linux> setenv COLUMNS

linux> ./my1s

.

. //Output is 40 columns wide

.

linux> unsetenv COLUMNS

linux> ./my1s

.

 //Output is now 80 columns wide

.

Blurred answer
Students have asked these similar questions
Use the Bash shell for the completion of this project. Develop a shell scripting application that allows the user to perform some advanced mathematical operations. Your application should allow the user to perform these  tasks: Task 2: Find the term of any linear sequence given by the rule Term = a * n + b, where a and b are integers specified by the user and n is a positive integer and print them in order (for example if the user inputs a=3, b=-4, the first few terms that should be printed are -1, 2, 5, 8, 11…). The user also will specify how many terms the program should print. In addition, the program should print the sum of terms found and a count of how many odd terms were found.
Create a new file in c++.  In this lab, you will add some functionality to the table ofmenu. Your boss (me) has decided that letters should be used for menu items instead of digits (because there are more alpha characters than numeric ones, so more additional menu items could be added in the future). We all know that programmers are lazy, but so are most users! So, the user should be able to enter either uppercase (A) or lowercase (a) for their menu selection. Also, it is important to let the user know if they entered an invalid choice. Write a program that displays the following menu and prompts the user for a selection. Once the selection has been made, display the selection back to the user. Then, ask the user for two numbers and perform the selected operation (+, -, *, /). Display the results back to the user (e.g. 2 + 3 = 5). When dividing, display an error message if the second number is 0. A)   Add two numbers B)   Subtract two numbers C)   Multiply two numbers D)   Divide two…
Computer Science      Practice Task : Write a program in phyton language . Implement Water Jug Problem using DFS in Python, initial stage (0,0) and final stage (2,Y). A Water Jug Problem: You are given two jugs, a 4-gallon one and a 3- gallon one, a pump which has unlimited water which you can use to fill the jug, and the ground on which water may be poured. Neither jug has any measuring markings on it. How can you get exactly 2 gallons of water in the 4-gallon jug?
Knowledge Booster
Background pattern image
Computer Science
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
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
Instruction Format (With reference to address); Author: ChiragBhalodia;https://www.youtube.com/watch?v=lNdy8HREvgo;License: Standard YouTube License, CC-BY