Piece of cake... #include <stdio.h> main() { unsigned long int x; fscanf(stdin, "%d", &x); fprintf(stdout, "%d", x<<4); } ernie <jdestefa> ~% cc -o bit bit.c ernie <jdestefa> ~% echo 50 | ./bit 800 ernie <jdestefa> ~% ernie <jdestefa> ~% export TEST=`echo 50 | ./bit` ernie <jdestefa> ~% echo $TEST 800 On Wed, 14 Mar 2001, John Joseph Trammell wrote: > On Wed, Mar 14, 2001 at 05:42:05PM -0600, Jason DeStefano wrote: > > > #include <stdio.h> > > main() { > > int x; > > fscanf(stdin, "%d", &x); > > return (x << 4); > > } > > [ bayazid ~/test/bitshift-001 ] echo 1 | ./a.out > [ bayazid ~/test/bitshift-001 ] echo $? > 16 > [ bayazid ~/test/bitshift-001 ] echo 333 | ./a.out > [ bayazid ~/test/bitshift-001 ] echo $? > 208 > [ bayazid ~/test/bitshift-001 ] > > Nice try. Too bad I want to bit-shift values greater than 64... > > _______________________________________________ > tclug-list mailing list > tclug-list at mn-linux.org > https://mailman.mn-linux.org/mailman/listinfo/tclug-list >