Make Some Changes

process hello { output : path ‘hello.txt’ script: """ echo ‘Hello world!’ > hello.txt “”"}

We want to send the text to a file called ‘hello.txt.’ Now we can update our shell command to send the text to a file, and we can add an output in our process to define our file name and since out output is a file, we’ll specify the type of output as a path.

Run main.nf in terminal and show it still went to ‘work’ directory

This was better, but we still have to dig around for the file, so let’s add one more thing to our process.

Previous
Next
RC Logo RC Logo © 2026 The Rector and Visitors of the University of Virginia