Aside from putting that shebang line at the top of the file you want to run as 
a script, the file has to be saved as a NimScript file, namely use a .nims file 
ending.

someScript.nims 
    
    
    #!/usr/bin/env nim
    
    echo "Hello from NimScript!"
    echo defined(NimScript)
    
    
    Run

and then in your terminal: 
    
    
    chmod +x someScript.nims
    ./someScript.nims
    
    
    Run

and it should run just fine. 

Reply via email to