parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to build the parallel nature into the script?


From: Shlomi Fish
Subject: Re: how to build the parallel nature into the script?
Date: Wed, 13 Dec 2017 11:02:48 +0200

Hi,

On Wed, 13 Dec 2017 01:06:28 -0500
paralleluser <paralleluser@fastmail.net> wrote:

> Dear Friends,
> 
> Given a shell script, script.bash, it takes one argument, $1, which is a file
> name to process, like this: script.bash myfile.txt
> 
> To parallelize this I can do:
> parallel script.bash ::: *.txt
> 
> But what is the easiest way to build the parallel nature into the script so I
> can do: script.bash *.txt
> 

Why not write a wrapper script that does:


#!/bin/bash
parallel script.bash ::: "$@"


Regards,

        Shlomi

> and parallel does its magic behind the scenes?
> 
> Thanks!...
> 



-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Best Introductory Programming Language - http://shlom.in/intro-lang

If a million Shakespeares had to write together, they would write like a monkey.
    — based on Stephen Wright, via Nadav Har’El.

Please reply to list if it's a mailing list post - http://shlom.in/reply .



reply via email to

[Prev in Thread] Current Thread [Next in Thread]