[Thread Prev][Thread Next][Index]

[ferret_users] create go files on the fly



Hi Ferreters,

I have a script in which a chunk of code is used several times, so I copied and pasted it into several different places. Then I thought, well, maybe I can shorten my script by wrapping that chuck of code in an additional go file, and if possible, on the fly. So I tried the following,

sp cat << EOF > tmp.jnl

my code here

EOF

go tmp.jnl
...
go tmp.jnl
...
...
sp rm -f tmp.jnl

But it doesn't work. The lines in between two EOF didn't find themselves in the file tmp.jnl. Has anyone done similar tricks before? I really like the idea of creating files on the fly...

Thanks,
David


[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement