Could an until loop sometimes never execute

Assignment Help Computer Engineering
Reference no: EM1336598

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: EM1336598

Questions Cloud

Write down a shell script to send a customized : Write down a shell script to send a customized mail message to the users listed on the command line by login (user) name, only if they are currently logged on. If no users are listed on the command line, an error message should be printed.
Lucidate what will happen to the economy in the short run : If the government decides to intervene to return the economy to full employment, elucidate what will happen to the economy in the short run and in the long run.
Explain important information about marketing discussion : Explain Important information about Marketing Discussion and Most discussions of marketing strategy focus on large businesses like Procter and Gamble
Forecast the next period using simple exponential smoothing : Calculate the forecast for the next period using simple exponential smoothing.
Could an until loop sometimes never execute : could an until loop sometimes never execute.
Utlizing the aggregate demand and aggregate supply : Utlizing the aggregate demand and aggregate supply model, draw an economy in a boom.
Concept of victim precipitation supported by evidence : Why is the concept of victim precipitation so controversial? Do you feel the concept is adequately supported by evidence?
Suppose the script ran under the bourne shell : suppose the script ran under the Bourne shell.
Explain marketing mix impact the marketing strategy : Explain Marketing mix and explain how the elements (product, place, price, and promotion) of the marketing mix impact the development of the organization's marketing strategy and tactics

Reviews

Write a Review

Computer Engineering Questions & Answers

  Give the advantages and the disadvantages of each method

give the advantages and the disadvantages of each method.

  Program to determine weighted average of test

Write an algorithm for a program which prompts the user to enter the five test scores, determine total of the five tests and determine the weighted average of each test supposing that each test weighs 20%.

  The importance of the common protocol (tcp/ip)

how the other future communication needs may or may not continue this dependence.

  Develop an application with the chosen dbms

A school intends to procure the integrated student management application holding all details of registered students including personal information, courses taken, and examination grades.

  Explain the difference between analog and digital

explain the difference between Transmission Control Protocol (TCP) and Internet Protocol (IP).

  Risks in the development of wearable pda

Assume an entrepreneur is proposing in order to design a wearable PDA which is unobtrusive and responds to the voice commands.

  Write a java program that uses a two-dimensional array

Write a Java program that uses a two-dimensional array

  Determining dimension of polyhydron

Determine the dimension of P. Find the inequalities which describe each extreme point of P.

  Write a java program that creates an array of integers

Write a java program that creates an array of integers

  Make a 2010 word flowchart listing the steps

You are sitting on a chair in a large room. You see an empty chair, facing you, across the room. You want to get to that chair on the other side of the room and sit in it.

  Make draft or a excel spreadsheet of java vs. c++

want a draft or a excel spreadsheet of Java vs. C++ and its comparisons. I want bold statements and strong related bold information.

  Find terms of elimination of redundant data

Thinking in terms of elimination of redundant data hopefully eliminating data corruption from operator input, would it not make sense to normalize and let new Duo-Core, Quad-Core processors take-up the slack and even decrease query times.

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