Find the answer to your Linux question:
Results 1 to 2 of 2
Hey, I'm very new to bash scripting and would really appreciate a bit of help with my problem - it's probably just a simple stupid thing... This is my script: ...
  1. #1
    Just Joined!
    Join Date
    Jan 2008
    Posts
    2

    My script won't run at home but will at work - help???

    Hey,
    I'm very new to bash scripting and would really appreciate a bit of help with my problem - it's probably just a simple stupid thing...

    This is my script:

    #This script executes the program kt3d with the parameter
    #file kt3d.par as is specified below
    cat<<EOF>run-temp
    cat<<END>kt3d.par
    #Start of parameter file below this line
    START OF PARAMETERS:
    oilsands3d.dat -file with data
    1 2 3 4 5 0 - columns for DH,X,Y,Z,var,sec var
    0 1.0e21 - trimming limits
    0 -option: 0=grid, 1=cross, 2=jackknife
    xvk.dat -file with jackknife data
    1 2 0 3 0 - columns for X,Y,Z,vr and sec var
    3 -debugging level: 0,1,2,3
    kt3d.dbg -file for debugging output
    kt3d.out -file for kriged output
    180 146025 50 -nx,xmn,xsiz
    120 252025 50 -ny,ymn,ysiz
    13 205 10 -nz,zmn,zsiz
    1 1 1 -x,y and z block discretization
    4 8 -min, max data for kriging
    0 -max per octant (0-> not used)
    500.0 500.0 500.0 -maximum search radii
    0.0 0.0 0.0 -angles for search ellipsoid
    0 2.302 -0=SK,1=OK,2=non-st SK,3=exdrift
    0 0 0 0 0 0 0 0 0 -drift: x,y,z,xx,yy,zz,xy,xz,zy
    0 -0, variable; 1, estimate trend
    extdrift.dat -gridded file with drift/mean
    4 - column number in gridded file
    1 0.3 -nst, nugget effect
    1 0.7 0.0 0.0 0.0 -it,cc,ang1,ang2,ang3
    3000.0 3000.0 3000.0 -a_hmax, a_hmin, a_vert
    #end of parameter file above this line
    END
    kt3d kt3d.par
    rm kt3d.par
    EOF
    rm run-temp
    I read this link and tried to get some advice, but still couldn't make it work.

    Here's the kicker:
    This script works for me on my work computer (Windows XP and Cygwin) but does not work on my home computer (Windows Vista with Cygwin).

    Any help is much appreciated.


    As a bit of extra information, if I do the following

    Write the fist hello.sh bash script as follows:

    --------------------------------
    # hello.sh
    # This is my first shell script
    echo "Hello! Bash is wonderful."
    Then I have no problems and hello.sh executes exactly as it should.

    Thanks again for any help.

  2. #2
    Just Joined!
    Join Date
    Jan 2008
    Posts
    2
    I should add that the problem is that I get an error:

    "no such file or directoryemp"

    Even though, it works fine for the hello.sh simple script.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...