Question
A gift box has 10 bangles. The average weight of the
first four bangles is 49 gms and the remaining weight of the 6 bangles is 50 gms. Tell the average weight of all bangles (in grams)Solution
The average weight of the first 4 bangles = 49 gm Sum of weight of the first 4 bangles = 49 x 4 = 196 gms The average weight of the last 6 bangles = 50 gm Sum of weight of the last 6 bangles = 50 x 6 = 300 gms Total weight of the 10 bangles = 196 + 300 = 496 gms Average weight of the 10 bangles = 496/10 = 49.6
How can you make a shell script executable?
Which command is used to display the current working directory?
What does the #!/bin/bash line at the beginning of a shell script indicate?
In shell scripting, how do you assign the string "Hello World" to a variable named `MESSAGE`?
Which command is used to display the number of lines in a file?
Extended globbing in bash allows:
What does the command `chmod 755 myscript.sh` set as permissions for `myscript.sh`?
In bash, what does trap 'echo Exit' EXIT do?
Which command is used to display the last few lines of a file?
Which ETL process step validates and cleans data before loading?