I am missing something here, I have a file which contains only one line and that is either a number or character string. I am trying to read the file and assign that value to a variable and here it seems I am missing something and not getting the expected results... Here is the code :
#!/bin/ksh
cat dbsnap2.txt | grep 'Rows selected' | cut -c 46-60 > Rows_selected.tmp
cat Rows_selected.tmp
rows=`echo "Rows_selected.tmp"`
echo "Rows selected are ............" rows
Output coming out is
--------------------
128622023
Rows selected are ............ rows
Output expected is
--------------------
128622023
Rows selected are ............ 128622023
Appreciate your help. Let me know if you need more info.