Determine the output of the following command: [ -z “” ] && echo 0 || echo 1



Determine the output of the following command: [ -z “” ] && echo 0 || echo 1..

Answer / Nirbhaya Singh

[ -z "" ] && echo 0 || echo 1 returns: 1

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Shell Script Interview Questions

What are the different types of shell scripting?

1 Answers  


Set up a Sev 2 alert when the Primary WA service fails. A windows batch script needs to be created that will monitor the WA service on the Primary and when the service stops/fails a Sev 2 TT is generated for a particular team ?

1 Answers   TCS,


What are the different methods available to run a shell script?

2 Answers  


what do u mean by $#,$* in unix programming?

5 Answers   Convergys, TCS,


How many fields are present in a crontab file and what does each field specify?

1 Answers  


How do I run a shell script on a mac?

1 Answers  


What is eval in shell script?

1 Answers  


What is web script?

1 Answers  


How would you print just the 25th line in a file using smallest shell script?

4 Answers  


write a shell script to identify the given string is palindrome or not?

17 Answers   CTS, HP, IBM, InfoEst, Wipro,


What is sed in shell script?

1 Answers  


What are the advantages of bash over all other shells?

1 Answers  


Categories