Can an until loop sometimes never execute

Assignment Help Programming Languages
Reference no: EM13947976

Give brief answers for the following questions.

1. Can an until loop sometimes never execute?

2. Will the following script execute with no errors?

#!/bin/csh
for I
do
echo $I
done

3. Does the following script print to standard output, a list of numbers equal to the number passed on the command line?

#!/bin/sh

count=$1

index=1
while [ "0$index" -le $count ]
do
echo $index
index=`expr "$index" + 1`
done

4. Will the following statement print 'I am glad this class is over' to standard output if the shell variable XYZ is NULL or not set?

: ${XYZ:?"I am glad this class is over"}

5. After the statement

: ${VISUAL:=vi}

will the value of the shell variable VISUAL always be vi?

6. Will the following command execute:

${VISUAL:+vi} ls

the command 'ls' if the shell variable VISUAL is not set or null?

7. Will the following commands send to the line printer all files whose contents contain the text '/bin/sh' if the command to print is lpr ?

MATCH=`grep -l '/bin/sh' *`
lpr ${MATCH?"NO files found"}

Reference no: EM13947976

Questions Cloud

Find mean , variance and standard derivation : Ther are 8 balls in a sample 5 white and 3 black .x is the number of black balls in the sample. three white are selected. white are selected from sample.write the probability distribution and find of x . and find mean , variance and standard deri..
Explain why the first view is more of a myth than reality : Explain why the first view is more of a myth than reality. In offering this explanation, give explicit reasons for your position.
Ethical principles of psychologists : Which of the five General Principles from the APA Ethics Code do you think the psychologist might have violated by his response in this case
Is this process wide sense stationary : A random process has sample functions of the form X(t)=A, where A is a Rayleigh distributed random variable with mean of 4. Is this process wide sense stationary? If so, why?
Can an until loop sometimes never execute : Does the following script print to standard output, a list of numbers equal to the number passed on the command line?
Explain about term opportunity cost : How a rise in the price of sugar affects the market for sodas - How federal government budget deficits affect interest rates.
Screw dislocations of opposite sign : 1. Is it possible for two screw dislocations of opposite sign to annihilate each other? Explain your answer. 2. For each of edge, screw, and mixed dislocations, cite the relationship between the direction of the applied shear stress and the directi..
When an economy grows the production or output increases : When an economy grows the production or output increases. With the above data, believes that India has an inflationary gap, a gap was recessive or full employment?
Explain caesar cipher and write down caesar cipher algo : Explain "Caesar Cipher". and Write down Caesar Cipher algorithm in C code.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write the program to display company-s payroll report

Write down the program to display company's payroll report in list box. The program must read each employee's name, hourly rate, and hours worked from file and produce report in a table format.

  Tools assist novice programmer to generate code

Structured English and gave to a novice programmer who used it to create code? If not, what other tools could be used to assist the novice programmer to generate code?

  Compute tax percentage using nested if

On Home Sales Data worksheet, in column E, compute Tax Percentage. Using nested IF calculate the following (Hint: do not use the function AND because if the house does not have 1 bedroom

  Write a program to find the largest of five numbers

Write a program to find the largest of five numbers obtained from the user with an input dialog box

  Two stacks of positive integers are needed

Two stacks of positive integers are needed, both containing integers with values less than or equal to 1000. One stack contains even integers; the other contains odd integers. The total number of elements in the combined stacks is never more than ..

  Discuss the current business scenario of having a budget

Discuss the current business scenario of having a budget of $5000 to target. Can you envision a better strategy if the objective is to maximize the total profit from the campaign? Consider again what additional information you might want that shou..

  Basics of hypertext markup language

The basics of Hypertext Markup Language and World Wide Web.

  Design a class named customerrecord that holds a customer

design a class named customerrecord that holds a customer number name and address. include methods to set the values

  Analyze problem develop a solution

Analyze each problem, develop a solution and implement your solution. Copy and paste your program and a sample output below each problem.

  Create drawing application using gui components

Create drawing application (have look at Microsoft Paint application on your Windows system). Application should have menus.

  Create inheritance hierarchy containing base class

Create an inheritance hierarchy containing base class Account and derived classes SavingsAccount and CheckingAccount that inherit from class Account.

  Program to run at end of semester to produce grade summary

Write the program for instructor to run at the end of the semester to produce grade summary for one student, as shown in box below.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd