How can I get the value of current from this NGSPICE Code?
You forgot to start the NGspice code with a so called title line with the keyword netlist.
So, the first line should be something like "[your title] netlist".

Without that line, the simulation output shows a:
Fatal error: DCtrCurv: source / resistor vcc not in circuit
which explains there are no (relevant) datapoints for i(vdummy).

Using the following will give the desired result.

testcircuit netlist
vcc 3 0 dc=10
vin 4 0 0.8 
vdummy 1 2 
R1 4 5 50k
r3 3 1 1k
Q1 2 5 0 mybjt 
.model mybjt npn(IS=1E-16 VJE=0.7 CJE=2.6734e-11 CJC= 1.4040e-11 BF=200)
.control
op
dc vcc 0 10 1 vin 0.7 0.8 0.02 
run 
plot i(vdummy) 
.endc 
.end