using Octave and bash command together

Hej all,

I have an script which I run it with Octave command in Linux, I want to know how could I put bash commands like grep and sed and use them together with octave?

My Octave script:

Script.sh:

m = load ("file", "-ascii")
for i=1:10
    g(i)= sin(m)
end

and then I use this command for running it:

Octave Script.sh

How could I use bash commands like grep and sed inside the octave script?

Using octave in bash sounds much more feasible than vice versa.

don't know octave, but is system() command found in octave, similar as other language?