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 a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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