i am trying to come up with a script that incorporates other scripts. eg zfs send pool/filesystem1 at 100911 > /backup/filesystem1.snap zfs send pool/filesystem2 at 100911 > /backup/filesystem2.snap i need to incorporate these 2 into a single script with both commands running concurrently.
On 09 September, 2011 - cephas maposah sent me these 0,4K bytes:> i am trying to come up with a script that incorporates other scripts. > > eg > zfs send pool/filesystem1 at 100911 > /backup/filesystem1.snap > zfs send pool/filesystem2 at 100911 > /backup/filesystem2.snap#!/bin/sh zfs send pool/filesystem1 at 100911 > /backup/filesystem1.snap & zfs send pool/filesystem2 at 100911 > /backup/filesystem2.snap ..?> i need to incorporate these 2 into a single script with both commands > running concurrently./Tomas -- Tomas Forsman, stric at acc.umu.se, http://www.acc.umu.se/~stric/ |- Student at Computing Science, University of Ume? `- Sysadmin at {cs,acc}.umu.se
Plus, you''ll need an & character at the end of each command. -- Sriram On 9/9/11, Tomas Forsman <stric at acc.umu.se> wrote:> On 09 September, 2011 - cephas maposah sent me these 0,4K bytes: > >> i am trying to come up with a script that incorporates other scripts. >> >> eg >> zfs send pool/filesystem1 at 100911 > /backup/filesystem1.snap >> zfs send pool/filesystem2 at 100911 > /backup/filesystem2.snap > > #!/bin/sh > zfs send pool/filesystem1 at 100911 > /backup/filesystem1.snap & > zfs send pool/filesystem2 at 100911 > /backup/filesystem2.snap > > ..? > >> i need to incorporate these 2 into a single script with both commands >> running concurrently. > > /Tomas > -- > Tomas Forsman, stric at acc.umu.se, http://www.acc.umu.se/~stric/ > |- Student at Computing Science, University of Ume? > `- Sysadmin at {cs,acc}.umu.se > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >-- Sent from my mobile device =================Belenix: www.belenix.org
On Fri, Sep 9, 2011 at 5:33 AM, Sriram Narayanan <sriram at belenix.org> wrote:> Plus, you''ll need an & character at the end of each command.And a wait command, if you want the script to wait for the sends to finish (which you should). Nico --
On 09/09/11 6:33 AM, Sriram Narayanan wrote:> Plus, you''ll need an & character at the end of each command. >Only one of the commands needs to be backgrounded. --Toby> -- Sriram > > On 9/9/11, Tomas Forsman <stric at acc.umu.se> wrote: >> On 09 September, 2011 - cephas maposah sent me these 0,4K bytes: >> >>> i am trying to come up with a script that incorporates other scripts. >>> >>> eg >>> zfs send pool/filesystem1 at 100911 > /backup/filesystem1.snap >>> zfs send pool/filesystem2 at 100911 > /backup/filesystem2.snap >> >> #!/bin/sh >> zfs send pool/filesystem1 at 100911 > /backup/filesystem1.snap & >> zfs send pool/filesystem2 at 100911 > /backup/filesystem2.snap >> >> ..? >> >>> i need to incorporate these 2 into a single script with both commands >>> running concurrently. >> >> /Tomas >> -- >> Tomas Forsman, stric at acc.umu.se, http://www.acc.umu.se/~stric/ >> |- Student at Computing Science, University of Ume? >> `- Sysadmin at {cs,acc}.umu.se >> _______________________________________________ >> zfs-discuss mailing list >> zfs-discuss at opensolaris.org >> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >> >
imho, there is not harm to use & in both cmd Sent from my iPad Hung-Sheng Tsao ( LaoTsao) Ph.D On Sep 10, 2011, at 4:59, Toby Thain <toby at telegraphics.com.au> wrote:> On 09/09/11 6:33 AM, Sriram Narayanan wrote: >> Plus, you''ll need an & character at the end of each command. >> > > Only one of the commands needs to be backgrounded. > > --Toby > >> -- Sriram >> >> On 9/9/11, Tomas Forsman <stric at acc.umu.se> wrote: >>> On 09 September, 2011 - cephas maposah sent me these 0,4K bytes: >>> >>>> i am trying to come up with a script that incorporates other scripts. >>>> >>>> eg >>>> zfs send pool/filesystem1 at 100911 > /backup/filesystem1.snap >>>> zfs send pool/filesystem2 at 100911 > /backup/filesystem2.snap >>> >>> #!/bin/sh >>> zfs send pool/filesystem1 at 100911 > /backup/filesystem1.snap & >>> zfs send pool/filesystem2 at 100911 > /backup/filesystem2.snap >>> >>> ..? >>> >>>> i need to incorporate these 2 into a single script with both commands >>>> running concurrently. >>> >>> /Tomas >>> -- >>> Tomas Forsman, stric at acc.umu.se, http://www.acc.umu.se/~stric/ >>> |- Student at Computing Science, University of Ume? >>> `- Sysadmin at {cs,acc}.umu.se >>> _______________________________________________ >>> zfs-discuss mailing list >>> zfs-discuss at opensolaris.org >>> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >>> >> > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
On 10/09/11 8:31 AM, LaoTsao wrote:> imho, there is not harm to use & in both cmd >There is a difference. --T> Sent from my iPad > Hung-Sheng Tsao ( LaoTsao) Ph.D > > On Sep 10, 2011, at 4:59, Toby Thain <toby at telegraphics.com.au> wrote: > >> On 09/09/11 6:33 AM, Sriram Narayanan wrote: >>> Plus, you''ll need an & character at the end of each command. >>> >> >> Only one of the commands needs to be backgrounded. >> >> --Toby >> >>> -- Sriram >>> >>> On 9/9/11, Tomas Forsman <stric at acc.umu.se> wrote: >>>> On 09 September, 2011 - cephas maposah sent me these 0,4K bytes: >>>> >>>>> i am trying to come up with a script that incorporates other scripts. >>>>> >>>>> eg >>>>> zfs send pool/filesystem1 at 100911 > /backup/filesystem1.snap >>>>> zfs send pool/filesystem2 at 100911 > /backup/filesystem2.snap >>>> >>>> #!/bin/sh >>>> zfs send pool/filesystem1 at 100911 > /backup/filesystem1.snap & >>>> zfs send pool/filesystem2 at 100911 > /backup/filesystem2.snap >>>> >>>> ..? >>>> >>>>> i need to incorporate these 2 into a single script with both commands >>>>> running concurrently. >>>> >>>> /Tomas >>>> -- >>>> Tomas Forsman, stric at acc.umu.se, http://www.acc.umu.se/~stric/ >>>> |- Student at Computing Science, University of Ume? >>>> `- Sysadmin at {cs,acc}.umu.se >>>> _______________________________________________ >>>> zfs-discuss mailing list >>>> zfs-discuss at opensolaris.org >>>> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >>>> >>> >> >> _______________________________________________ >> zfs-discuss mailing list >> zfs-discuss at opensolaris.org >> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >