Script not giving o/p

Hi

Below is snippet from script which is not giving the o/p.script name is alarm.sh

#!/bin/sh
out=`awk '(NR>1) {print $9;exit}' alarm`
  echo $a
  

however when i simply run the above command i an getting the o/p

$ out=`awk '(NR>1) {print $9;exit}' alarm`          
$   echo $a
6 --->o/p

request you to please let me for such behavior. as why i am not getting the o/p

You're putting the results of awk in in $out, so shouldn't it be echo $out instead of $a ?

I think "alarm" should be "alarm.sh", like this...
out=`awk '(NR>1) {print $9;exit}' alarm.sh`

i feel, it just executes the "echo $a"

ok, one question... whats there in that alarm.sh?
i feel

`awk '(NR>1) {print $9;exit}' alarm.sh`

this code is checking if the file alarm.sh is having more than one line or not. if its having more than one line, it prints out the $9(10th field on that file). if alarm.sh is empty, then the awk just exits.