rhombidodecahedron
rhombidodecahedron

Reputation: 7922

Forking and saving output of a lisp program

I have a lisp program that needs to run for a long, long time. I wanted to make a bash script so that I could just do $./script.sh& on my school's computer and then check the output periodically without having to be personally running the process. All I want to do is call the program "clisp" and have it execute these commands:

(load "ll.l")
(make)

and save all output to a file. How do I make this script?

Upvotes: 0

Views: 182

Answers (2)

CharlesB
CharlesB

Reputation: 90496

Look at the nohup built-in bash command:

From Wikipedia

nohup is most often used to run commands in the background as daemons. Output that would normally go to the terminal goes to a file called nohup.out if it has not already been redirected. This command is very helpful when there is a need to run numerous batch jobs which are inter-dependent

You can launch the script with nohup, and when you relog see the progress in the nohup.out file

Upvotes: 4

Ernest Friedman-Hill
Ernest Friedman-Hill

Reputation: 81724

You just want something like this:

#!/bin/sh
clisp > OUTPUTFILE 2>&1 << EOF
(load "11.1")
(make)
EOF 

Upvotes: 2

Related Questions