[14:45:33] anyone know some sort of local queue manager to run commands? Like if I've got 10 commands to run, and I want 3 to run at a time... [14:45:39] I tried xargs with --max-procs but.. its not working. [14:47:05] you using -n also? [14:47:07] spot: heh, thanks for the good ranting post :) [14:47:08] or atleast its not doing what I thought it'd do. [14:47:20] halfline: yeah. [14:47:25] let me get you exactly what I was attempting. [14:48:24] halfline: so I've got a file, run, that has 3 lines in it, each is 'sleep 1' [14:48:28] time cat run | xargs -P0 -n1 --no-run-if-empty -t -0 sh -c [14:49:06] err - [14:49:07] time cat run | xargs -n3 -L3 --max-procs=3 -0 sh -c [14:49:14] that takes 3 seconds, shouldn't it take slightly longer then 1? [14:52:38] hmm you'd think [14:53:02] *** jmtaylor (n=jason@c-76-112-93-58.hsd1.mi.comcast.net) has joined chat #fedora-admin. [14:54:49] *** De[X]tone has left chat #fedora-admin (Read error: 54 (Connection reset by peer)). [14:55:30] oh i think it's your -0 [14:55:48] mmcgrath: torque, but that's probably overkill [14:56:18] time xargs -a run -n 1 -l -t -P0 -IARG sh -c "ARG" [14:56:19] works [14:56:23] mmcgrath: "make -j3" ? [14:56:46] it was just doing sh -c "sleep 1 \n sleep 1 \n sleep 1" before [14:56:55] halfline: I think we have a winner. [14:56:58] ahhhh. [14:57:05] since -0 makes it not split on newline [15:00:30] actually probably better to do tr '\n' '\0' or whatever so it doesn't ever split on non-newline whitespace [15:00:36] or set IFS to just \n [15:01:23] *** Sonar_Gal has left chat #fedora-admin (Remote closed the connection). [15:02:22] *** EvilBob has left chat #fedora-admin (Connection reset by peer). [15:03:31] *** fabian_a has left chat #fedora-admin (Read error: 113 (No route to host)). [15:04:27] *** EvilBob (n=EvilBob@fedora/bobjensen) has joined chat #Fedora-Admin. [15:14:13] halfline: hmm [15:14:19] so now the test works but my actual script does not. [15:14:29] probably cause of the arg issue [15:14:34] yeah [15:14:39] and there's a varied list of args. [15:15:18] do cat run | tr '\n' '\0' | xargs -n1 -l -P0 -IARG -0 sh -c '"ARG"' maybe [15:15:36] * halfline tries [15:16:34] *** LinuxCode has left chat #fedora-admin ("Leaving"). [15:16:34] *** Rasther has left chat #fedora-admin (Remote closed the connection). [15:16:35] too many quotes [15:17:53] yea, does cat run | tr '\n' '\0' | xargs -n1 -l -P0 -IARG -0 sh -c 'ARG' work for you? [15:18:19] I think we have a winner [15:18:31] doh that's what you said last time [15:18:34] way to jinx it dude [15:18:41] hahah [15:18:47] naw, I just tried it and it seems to be working.