1 2**** 3NAME 4**** 5 6 7env_parallel - export environment to GNU parallel 8 9 10******** 11SYNOPSIS 12******** 13 14 15\ **env_parallel**\ [--record-env|--session|--end-session] 16 [options for GNU Parallel] 17 18 19*********** 20DESCRIPTION 21*********** 22 23 24\ **env_parallel**\ is a shell function that exports the current 25environment to GNU \ **parallel**\ . 26 27If the shell function is not loaded, a dummy script will be run 28instead that explains how to install the function. 29 30\ **env_parallel**\ is 100 ms slower at startup than pure GNU 31\ **parallel**\ , and takes up to 30% longer to start a job (typically 15 ms). 32 33Due to the problem with environment space (see below) the recommended 34usage is either: 35 36 37.. code-block:: perl 38 39 # Do --record-env into $PARALLEL_IGNORED_NAMES 40 env_parallel --session 41 42 # Define whatever you want to use 43 myfunc() { myalias and functions $myvar work. $1.; } 44 alias myalias='echo Aliases' 45 myvar='and variables' 46 47 # env_parallel will not export names in $PARALLEL_IGNORED_NAMES 48 env_parallel -S localhost myfunc ::: Hooray 49 50 51Or: 52 53 54.. code-block:: perl 55 56 # Record the "clean" environment (this only needs to be run once) 57 env_parallel --record-env 58 59 # Optionally edit ~/.parallel/ignored_vars (only needed once) 60 61 # Define whatever you want to use 62 myfunc() { myalias and functions $myvar work. $1.; } 63 alias myalias='echo Aliases' 64 myvar='and variables' 65 66 # Use --env _ to only transfer the names not in the "empty" environment 67 env_parallel --env _ -S localhost myfunc ::: Hooray 68 69 70In \ **csh**\ \ **--session**\ is not supported: 71 72 73.. code-block:: perl 74 75 # Record the "clean" environment - this only needs to be run once 76 env_parallel --record-env 77 78 # Optionally edit ~/.parallel/ignored_vars - only needed once 79 80 # Define whatever you want to use 81 alias myalias 'echo Aliases $myvar \!*.' 82 set myvar='and variables' 83 84 # Use --env _ to only transfer the names not in the "empty" environment 85 env_parallel --env _ -S localhost myalias ::: work 86 87 88Environment space 89================= 90 91 92By default \ **env_parallel**\ will export all environment variables, 93arrays, aliases, functions and shell options (see details for the 94individual shells below). 95 96But this only works if the size of the current environment is smaller 97than the maximal length of a command and smaller than half of the max 98if running remotely. E.g. The max size of Bash's command is 128 KB, so 99\ **env_parallel**\ will fail if '\ **set | wc -c**\ ' is bigger than 128 100KB. Technically the limit is in execve(1) which IPC::open3 uses. 101 102Bash completion functions are well-known for taking up well over 128 103KB of environment space and the primary reason for causing 104\ **env_parallel**\ to fail. 105 106Instead you can use \ **--env**\ to specify which variables, arrays, 107aliases and functions to export as this will only export those with 108the given name. Or follow the recommended usage in shown in 109DESCRIPTION. 110 111 112 113******* 114OPTIONS 115******* 116 117 118Same as GNU \ **parallel**\ in addition to these: 119 120 121- \ **--end-session**\ 122 123 Undo last \ **--session**\ 124 125 126 127- \ **--record-env**\ 128 129 Record all names currently defined to be ignored every time running 130 \ **env_parallel**\ in the future. 131 132 133 134- \ **--session**\ 135 136 Ignore all names currently defined. Aliases, variables, arrays, and 137 functions currently defined will not be transferred. 138 139 But names defined \ *after*\ running \ **parallel --session**\ \ *will*\ be 140 transferred. 141 142 This is only valid in the running shell, and can be undone with 143 \ **parallel --end-session**\ . 144 145 You can run multiple \ **--session**\ inside each other: 146 147 148 .. code-block:: perl 149 150 env_parallel --session 151 var=not 152 # var is transferred 153 env_parallel -Slocalhost 'echo var is $var' ::: ignored 154 env_parallel --session 155 # var is not transferred 156 env_parallel -Slocalhost 'echo var is $var' ::: ignored 157 env_parallel --end-session 158 # var is transferred again 159 env_parallel -Slocalhost 'echo var is $var' ::: ignored 160 161 162 163 164 165**************** 166SUPPORTED SHELLS 167**************** 168 169 170Ash 171=== 172 173 174Installation 175------------ 176 177 178Put this in $HOME/.profile: 179 180 181.. code-block:: perl 182 183 . `which env_parallel.ash` 184 185 186E.g. by doing: 187 188 189.. code-block:: perl 190 191 echo '. `which env_parallel.ash`' >> $HOME/.profile 192 193 194 195Supported use 196------------- 197 198 199\ **--env**\ is supported to export only the variable, or alias with the 200given name. Multiple \ **--env**\ s can be given. 201 202\ **--session**\ is supported. 203 204 205- aliases 206 207 208 .. code-block:: perl 209 210 alias myecho='echo aliases' 211 env_parallel myecho ::: work 212 env_parallel -S server myecho ::: work 213 env_parallel --env myecho myecho ::: work 214 env_parallel --env myecho -S server myecho ::: work 215 216 alias multiline='echo multiline 217 echo aliases' 218 env_parallel multiline ::: work 219 env_parallel -S server multiline ::: work 220 env_parallel --env multiline multiline ::: work 221 env_parallel --env multiline -S server multiline ::: work 222 223 224 225 226- functions 227 228 229 .. code-block:: perl 230 231 ash cannot list defined functions - thus is not supported. 232 233 234 235 236- variables 237 238 239 .. code-block:: perl 240 241 myvar=variables 242 env_parallel echo '$myvar' ::: work 243 env_parallel -S server echo '$myvar' ::: work 244 env_parallel --env myvar echo '$myvar' ::: work 245 env_parallel --env myvar -S server echo '$myvar' ::: work 246 247 248 249 250- arrays 251 252 Arrays are not supported by Ash. 253 254 255 256 257 258Bash 259==== 260 261 262Installation 263------------ 264 265 266Put this in $HOME/.bashrc: 267 268 269.. code-block:: perl 270 271 . `which env_parallel.bash` 272 273 274E.g. by doing: 275 276 277.. code-block:: perl 278 279 echo '. `which env_parallel.bash`' >> $HOME/.bashrc 280 281 282 283Supported use 284------------- 285 286 287\ **--env**\ is supported to export only the variable, alias, function, or 288array with the given name. Multiple \ **--env**\ s can be given. 289 290\ **--session**\ is supported. 291 292 293- aliases 294 295 296 .. code-block:: perl 297 298 alias myecho='echo aliases' 299 env_parallel myecho ::: work 300 env_parallel -S server myecho ::: work 301 env_parallel --env myecho myecho ::: work 302 env_parallel --env myecho -S server myecho ::: work 303 304 alias multiline='echo multiline 305 echo aliases' 306 env_parallel 'multiline {}; 307 echo but only when followed by a newline' ::: work 308 env_parallel -S server 'multiline {}; 309 echo but only when followed by a newline' ::: work 310 env_parallel --env multiline 'multiline {}; 311 echo but only when followed by a newline' ::: work 312 env_parallel --env multiline -S server 'multiline {}; 313 echo but only when followed by a newline' ::: work 314 315 316 317 318- functions 319 320 321 .. code-block:: perl 322 323 myfunc() { echo functions $*; } 324 env_parallel myfunc ::: work 325 env_parallel -S server myfunc ::: work 326 env_parallel --env myfunc myfunc ::: work 327 env_parallel --env myfunc -S server myfunc ::: work 328 329 330 331 332- variables 333 334 335 .. code-block:: perl 336 337 myvar=variables 338 env_parallel echo '$myvar' ::: work 339 env_parallel -S server echo '$myvar' ::: work 340 env_parallel --env myvar echo '$myvar' ::: work 341 env_parallel --env myvar -S server echo '$myvar' ::: work 342 343 344 345 346- arrays 347 348 349 .. code-block:: perl 350 351 myarray=(arrays work, too) 352 env_parallel -k echo '${myarray[{}]}' ::: 0 1 2 353 env_parallel -k -S server echo '${myarray[{}]}' ::: 0 1 2 354 env_parallel -k --env myarray echo '${myarray[{}]}' ::: 0 1 2 355 env_parallel -k --env myarray -S server \ 356 echo '${myarray[{}]}' ::: 0 1 2 357 358 359 360 361 362BUGS 363---- 364 365 366Due to a bug in Bash, aliases containing newlines must be followed by 367a newline in the command. Some systems are not affected by this bug, 368but will print a warning anyway. 369 370 371 372csh 373=== 374 375 376\ **env_parallel**\ for \ **csh**\ breaks \ **$PARALLEL**\ , so do not use 377\ **$PARALLEL**\ . 378 379Installation 380------------ 381 382 383Put this in $HOME/.cshrc: 384 385 386.. code-block:: perl 387 388 source `which env_parallel.csh` 389 390 391E.g. by doing: 392 393 394.. code-block:: perl 395 396 echo 'source `which env_parallel.csh`' >> $HOME/.cshrc 397 398 399 400Supported use 401------------- 402 403 404\ **--env**\ is supported to export only the variable, alias, or 405array with the given name. Multiple \ **--env**\ s can be given. 406 407 408- aliases 409 410 411 .. code-block:: perl 412 413 alias myecho 'echo aliases' 414 env_parallel myecho ::: work 415 env_parallel -S server myecho ::: work 416 env_parallel --env myecho myecho ::: work 417 env_parallel --env myecho -S server myecho ::: work 418 419 420 421 422- functions 423 424 Not supported by \ **csh**\ . 425 426 427 428- variables 429 430 431 .. code-block:: perl 432 433 set myvar=variables 434 env_parallel echo '$myvar' ::: work 435 env_parallel -S server echo '$myvar' ::: work 436 env_parallel --env myvar echo '$myvar' ::: work 437 env_parallel --env myvar -S server echo '$myvar' ::: work 438 439 440 441 442- arrays with no special chars 443 444 445 .. code-block:: perl 446 447 set myarray=(arrays work, too) 448 env_parallel -k echo \$'{myarray[{}]}' ::: 1 2 3 449 env_parallel -k -S server echo \$'{myarray[{}]}' ::: 1 2 3 450 env_parallel -k --env myarray echo \$'{myarray[{}]}' ::: 1 2 3 451 env_parallel -k --env myarray -S server \ 452 echo \$'{myarray[{}]}' ::: 1 2 3 453 454 455 456 457 458 459Dash 460==== 461 462 463Installation 464------------ 465 466 467Put this in $HOME/.profile: 468 469 470.. code-block:: perl 471 472 . `which env_parallel.dash` 473 474 475E.g. by doing: 476 477 478.. code-block:: perl 479 480 echo '. `which env_parallel.dash`' >> $HOME/.profile 481 482 483 484Supported use 485------------- 486 487 488\ **--env**\ is supported to export only the variable, or alias with the 489given name. Multiple \ **--env**\ s can be given. 490 491\ **--session**\ is supported. 492 493 494- aliases 495 496 497 .. code-block:: perl 498 499 alias myecho='echo aliases' 500 env_parallel myecho ::: work 501 env_parallel -S server myecho ::: work 502 env_parallel --env myecho myecho ::: work 503 env_parallel --env myecho -S server myecho ::: work 504 505 alias multiline='echo multiline 506 echo aliases' 507 env_parallel multiline ::: work 508 env_parallel -S server multiline ::: work 509 env_parallel --env multiline multiline ::: work 510 env_parallel --env multiline -S server multiline ::: work 511 512 513 514 515- functions 516 517 518 .. code-block:: perl 519 520 dash cannot list defined functions - thus is not supported. 521 522 523 524 525- variables 526 527 528 .. code-block:: perl 529 530 myvar=variables 531 env_parallel echo '$myvar' ::: work 532 env_parallel -S server echo '$myvar' ::: work 533 env_parallel --env myvar echo '$myvar' ::: work 534 env_parallel --env myvar -S server echo '$myvar' ::: work 535 536 537 538 539- arrays 540 541 542 .. code-block:: perl 543 544 dash does not support arrays. 545 546 547 548 549 550 551fish 552==== 553 554 555Installation 556------------ 557 558 559Put this in $HOME/.config/fish/config.fish: 560 561 562.. code-block:: perl 563 564 source (which env_parallel.fish) 565 566 567E.g. by doing: 568 569 570.. code-block:: perl 571 572 echo 'source (which env_parallel.fish)' \ 573 >> $HOME/.config/fish/config.fish 574 575 576 577Supported use 578------------- 579 580 581\ **--env**\ is supported to export only the variable, alias, function, or 582array with the given name. Multiple \ **--env**\ s can be given. 583 584\ **--session**\ is supported. 585 586 587- aliases 588 589 590 .. code-block:: perl 591 592 alias myecho 'echo aliases' 593 env_parallel myecho ::: work 594 env_parallel -S server myecho ::: work 595 env_parallel --env myecho myecho ::: work 596 env_parallel --env myecho -S server myecho ::: work 597 598 599 600 601- functions 602 603 604 .. code-block:: perl 605 606 function myfunc 607 echo functions $argv 608 end 609 env_parallel myfunc ::: work 610 env_parallel -S server myfunc ::: work 611 env_parallel --env myfunc myfunc ::: work 612 env_parallel --env myfunc -S server myfunc ::: work 613 614 615 616 617- variables 618 619 620 .. code-block:: perl 621 622 set myvar variables 623 env_parallel echo '$myvar' ::: work 624 env_parallel -S server echo '$myvar' ::: work 625 env_parallel --env myvar echo '$myvar' ::: work 626 env_parallel --env myvar -S server echo '$myvar' ::: work 627 628 629 630 631- arrays 632 633 634 .. code-block:: perl 635 636 set myarray arrays work, too 637 env_parallel -k echo '$myarray[{}]' ::: 1 2 3 638 env_parallel -k -S server echo '$myarray[{}]' ::: 1 2 3 639 env_parallel -k --env myarray echo '$myarray[{}]' ::: 1 2 3 640 env_parallel -k --env myarray -S server \ 641 echo '$myarray[{}]' ::: 1 2 3 642 643 644 645 646 647 648ksh 649=== 650 651 652Installation 653------------ 654 655 656Put this in $HOME/.kshrc: 657 658 659.. code-block:: perl 660 661 source `which env_parallel.ksh` 662 663 664E.g. by doing: 665 666 667.. code-block:: perl 668 669 echo 'source `which env_parallel.ksh`' >> $HOME/.kshrc 670 671 672 673Supported use 674------------- 675 676 677\ **--env**\ is supported to export only the variable, alias, function, or 678array with the given name. Multiple \ **--env**\ s can be given. 679 680\ **--session**\ is supported. 681 682 683- aliases 684 685 686 .. code-block:: perl 687 688 alias myecho='echo aliases' 689 env_parallel myecho ::: work 690 env_parallel -S server myecho ::: work 691 env_parallel --env myecho myecho ::: work 692 env_parallel --env myecho -S server myecho ::: work 693 694 alias multiline='echo multiline 695 echo aliases' 696 env_parallel multiline ::: work 697 env_parallel -S server multiline ::: work 698 env_parallel --env multiline multiline ::: work 699 env_parallel --env multiline -S server multiline ::: work 700 701 702 703 704- functions 705 706 707 .. code-block:: perl 708 709 myfunc() { echo functions $*; } 710 env_parallel myfunc ::: work 711 env_parallel -S server myfunc ::: work 712 env_parallel --env myfunc myfunc ::: work 713 env_parallel --env myfunc -S server myfunc ::: work 714 715 716 717 718- variables 719 720 721 .. code-block:: perl 722 723 myvar=variables 724 env_parallel echo '$myvar' ::: work 725 env_parallel -S server echo '$myvar' ::: work 726 env_parallel --env myvar echo '$myvar' ::: work 727 env_parallel --env myvar -S server echo '$myvar' ::: work 728 729 730 731 732- arrays 733 734 735 .. code-block:: perl 736 737 myarray=(arrays work, too) 738 env_parallel -k echo '${myarray[{}]}' ::: 0 1 2 739 env_parallel -k -S server echo '${myarray[{}]}' ::: 0 1 2 740 env_parallel -k --env myarray echo '${myarray[{}]}' ::: 0 1 2 741 env_parallel -k --env myarray -S server \ 742 echo '${myarray[{}]}' ::: 0 1 2 743 744 745 746 747 748 749mksh 750==== 751 752 753Installation 754------------ 755 756 757Put this in $HOME/.mkshrc: 758 759 760.. code-block:: perl 761 762 source `which env_parallel.mksh` 763 764 765E.g. by doing: 766 767 768.. code-block:: perl 769 770 echo 'source `which env_parallel.mksh`' >> $HOME/.mkshrc 771 772 773 774Supported use 775------------- 776 777 778\ **--env**\ is supported to export only the variable, alias, function, or 779array with the given name. Multiple \ **--env**\ s can be given. 780 781\ **--session**\ is supported. 782 783 784- aliases 785 786 787 .. code-block:: perl 788 789 alias myecho='echo aliases' 790 env_parallel myecho ::: work 791 env_parallel -S server myecho ::: work 792 env_parallel --env myecho myecho ::: work 793 env_parallel --env myecho -S server myecho ::: work 794 795 alias multiline='echo multiline 796 echo aliases' 797 env_parallel multiline ::: work 798 env_parallel -S server multiline ::: work 799 env_parallel --env multiline multiline ::: work 800 env_parallel --env multiline -S server multiline ::: work 801 802 803 804 805- functions 806 807 808 .. code-block:: perl 809 810 myfunc() { echo functions $*; } 811 env_parallel myfunc ::: work 812 env_parallel -S server myfunc ::: work 813 env_parallel --env myfunc myfunc ::: work 814 env_parallel --env myfunc -S server myfunc ::: work 815 816 817 818 819- variables 820 821 822 .. code-block:: perl 823 824 myvar=variables 825 env_parallel echo '$myvar' ::: work 826 env_parallel -S server echo '$myvar' ::: work 827 env_parallel --env myvar echo '$myvar' ::: work 828 env_parallel --env myvar -S server echo '$myvar' ::: work 829 830 831 832 833- arrays 834 835 836 .. code-block:: perl 837 838 myarray=(arrays work, too) 839 env_parallel -k echo '${myarray[{}]}' ::: 0 1 2 840 env_parallel -k -S server echo '${myarray[{}]}' ::: 0 1 2 841 env_parallel -k --env myarray echo '${myarray[{}]}' ::: 0 1 2 842 env_parallel -k --env myarray -S server \ 843 echo '${myarray[{}]}' ::: 0 1 2 844 845 846 847 848 849 850pdksh 851===== 852 853 854Installation 855------------ 856 857 858Put this in $HOME/.profile: 859 860 861.. code-block:: perl 862 863 source `which env_parallel.pdksh` 864 865 866E.g. by doing: 867 868 869.. code-block:: perl 870 871 echo 'source `which env_parallel.pdksh`' >> $HOME/.profile 872 873 874 875Supported use 876------------- 877 878 879\ **--env**\ is supported to export only the variable, alias, function, or 880array with the given name. Multiple \ **--env**\ s can be given. 881 882\ **--session**\ is supported. 883 884 885- aliases 886 887 888 .. code-block:: perl 889 890 alias myecho="echo aliases"; 891 env_parallel myecho ::: work; 892 env_parallel -S server myecho ::: work; 893 env_parallel --env myecho myecho ::: work; 894 env_parallel --env myecho -S server myecho ::: work 895 896 897 898 899- functions 900 901 902 .. code-block:: perl 903 904 myfunc() { echo functions $*; }; 905 env_parallel myfunc ::: work; 906 env_parallel -S server myfunc ::: work; 907 env_parallel --env myfunc myfunc ::: work; 908 env_parallel --env myfunc -S server myfunc ::: work 909 910 911 912 913- variables 914 915 916 .. code-block:: perl 917 918 myvar=variables; 919 env_parallel echo "\$myvar" ::: work; 920 env_parallel -S server echo "\$myvar" ::: work; 921 env_parallel --env myvar echo "\$myvar" ::: work; 922 env_parallel --env myvar -S server echo "\$myvar" ::: work 923 924 925 926 927- arrays 928 929 930 .. code-block:: perl 931 932 myarray=(arrays work, too); 933 env_parallel -k echo "\${myarray[{}]}" ::: 0 1 2; 934 env_parallel -k -S server echo "\${myarray[{}]}" ::: 0 1 2; 935 env_parallel -k --env myarray echo "\${myarray[{}]}" ::: 0 1 2; 936 env_parallel -k --env myarray -S server \ 937 echo "\${myarray[{}]}" ::: 0 1 2 938 939 940 941 942 943 944sh 945== 946 947 948Installation 949------------ 950 951 952Put this in $HOME/.profile: 953 954 955.. code-block:: perl 956 957 . `which env_parallel.sh` 958 959 960E.g. by doing: 961 962 963.. code-block:: perl 964 965 echo '. `which env_parallel.sh`' >> $HOME/.profile 966 967 968 969Supported use 970------------- 971 972 973\ **--env**\ is supported to export only the variable, or alias with the 974given name. Multiple \ **--env**\ s can be given. 975 976\ **--session**\ is supported. 977 978 979- aliases 980 981 982 .. code-block:: perl 983 984 sh does not support aliases. 985 986 987 988 989- functions 990 991 992 .. code-block:: perl 993 994 myfunc() { echo functions $*; } 995 env_parallel myfunc ::: work 996 env_parallel -S server myfunc ::: work 997 env_parallel --env myfunc myfunc ::: work 998 env_parallel --env myfunc -S server myfunc ::: work 999 1000 1001 1002 1003- variables 1004 1005 1006 .. code-block:: perl 1007 1008 myvar=variables 1009 env_parallel echo '$myvar' ::: work 1010 env_parallel -S server echo '$myvar' ::: work 1011 env_parallel --env myvar echo '$myvar' ::: work 1012 env_parallel --env myvar -S server echo '$myvar' ::: work 1013 1014 1015 1016 1017- arrays 1018 1019 1020 .. code-block:: perl 1021 1022 sh does not support arrays. 1023 1024 1025 1026 1027 1028 1029tcsh 1030==== 1031 1032 1033\ **env_parallel**\ for \ **tcsh**\ breaks \ **$PARALLEL**\ , so do not use 1034\ **$PARALLEL**\ . 1035 1036Installation 1037------------ 1038 1039 1040Put this in $HOME/.tcshrc: 1041 1042 1043.. code-block:: perl 1044 1045 source `which env_parallel.tcsh` 1046 1047 1048E.g. by doing: 1049 1050 1051.. code-block:: perl 1052 1053 echo 'source `which env_parallel.tcsh`' >> $HOME/.tcshrc 1054 1055 1056 1057Supported use 1058------------- 1059 1060 1061\ **--env**\ is supported to export only the variable, alias, or 1062array with the given name. Multiple \ **--env**\ s can be given. 1063 1064 1065- aliases 1066 1067 1068 .. code-block:: perl 1069 1070 alias myecho 'echo aliases' 1071 env_parallel myecho ::: work 1072 env_parallel -S server myecho ::: work 1073 env_parallel --env myecho myecho ::: work 1074 env_parallel --env myecho -S server myecho ::: work 1075 1076 1077 1078 1079- functions 1080 1081 Not supported by \ **tcsh**\ . 1082 1083 1084 1085- variables 1086 1087 1088 .. code-block:: perl 1089 1090 set myvar=variables 1091 env_parallel echo '$myvar' ::: work 1092 env_parallel -S server echo '$myvar' ::: work 1093 env_parallel --env myvar echo '$myvar' ::: work 1094 env_parallel --env myvar -S server echo '$myvar' ::: work 1095 1096 1097 1098 1099- arrays with no special chars 1100 1101 1102 .. code-block:: perl 1103 1104 set myarray=(arrays work, too) 1105 env_parallel -k echo \$'{myarray[{}]}' ::: 1 2 3 1106 env_parallel -k -S server echo \$'{myarray[{}]}' ::: 1 2 3 1107 env_parallel -k --env myarray echo \$'{myarray[{}]}' ::: 1 2 3 1108 env_parallel -k --env myarray -S server \ 1109 echo \$'{myarray[{}]}' ::: 1 2 3 1110 1111 1112 1113 1114 1115 1116Zsh 1117=== 1118 1119 1120Installation 1121------------ 1122 1123 1124Put this in $HOME/.zshrc: 1125 1126 1127.. code-block:: perl 1128 1129 . `which env_parallel.zsh` 1130 1131 1132E.g. by doing: 1133 1134 1135.. code-block:: perl 1136 1137 echo '. `which env_parallel.zsh`' >> $HOME/.zshenv 1138 1139 1140 1141Supported use 1142------------- 1143 1144 1145\ **--env**\ is supported to export only the variable, alias, function, or 1146array with the given name. Multiple \ **--env**\ s can be given. 1147 1148\ **--session**\ is supported. 1149 1150 1151- aliases 1152 1153 1154 .. code-block:: perl 1155 1156 alias myecho='echo aliases' 1157 env_parallel myecho ::: work 1158 env_parallel -S server myecho ::: work 1159 env_parallel --env myecho myecho ::: work 1160 env_parallel --env myecho -S server myecho ::: work 1161 1162 alias multiline='echo multiline 1163 echo aliases' 1164 env_parallel multiline ::: work 1165 env_parallel -S server multiline ::: work 1166 env_parallel --env multiline multiline ::: work 1167 env_parallel --env multiline -S server multiline ::: work 1168 1169 1170 1171 1172- functions 1173 1174 1175 .. code-block:: perl 1176 1177 myfunc() { echo functions $*; } 1178 env_parallel myfunc ::: work 1179 env_parallel -S server myfunc ::: work 1180 env_parallel --env myfunc myfunc ::: work 1181 env_parallel --env myfunc -S server myfunc ::: work 1182 1183 1184 1185 1186- variables 1187 1188 1189 .. code-block:: perl 1190 1191 myvar=variables 1192 env_parallel echo '$myvar' ::: work 1193 env_parallel -S server echo '$myvar' ::: work 1194 env_parallel --env myvar echo '$myvar' ::: work 1195 env_parallel --env myvar -S server echo '$myvar' ::: work 1196 1197 1198 1199 1200- arrays 1201 1202 1203 .. code-block:: perl 1204 1205 myarray=(arrays work, too) 1206 env_parallel -k echo '${myarray[{}]}' ::: 1 2 3 1207 env_parallel -k -S server echo '${myarray[{}]}' ::: 1 2 3 1208 env_parallel -k --env myarray echo '${myarray[{}]}' ::: 1 2 3 1209 env_parallel -k --env myarray -S server \ 1210 echo '${myarray[{}]}' ::: 1 2 3 1211 1212 1213 1214 1215 1216 1217 1218*********** 1219EXIT STATUS 1220*********** 1221 1222 1223Same as GNU \ **parallel**\ . 1224 1225 1226****** 1227AUTHOR 1228****** 1229 1230 1231When using GNU \ **env_parallel**\ for a publication please cite: 1232 1233O. Tange (2018): GNU Parallel 2018, March 2018, ISBN 9781387509881, 1234DOI: 10.5281/zenodo.1146014. 1235 1236This helps funding further development; and it won't cost you a cent. 1237If you pay 10000 EUR you should feel free to use GNU Parallel without citing. 1238 1239Copyright (C) 2007-10-18 Ole Tange, http://ole.tange.dk 1240 1241Copyright (C) 2008-2010 Ole Tange, http://ole.tange.dk 1242 1243Copyright (C) 2010-2021 Ole Tange, http://ole.tange.dk and Free 1244Software Foundation, Inc. 1245 1246 1247******* 1248LICENSE 1249******* 1250 1251 1252This program is free software; you can redistribute it and/or modify 1253it under the terms of the GNU General Public License as published by 1254the Free Software Foundation; either version 3 of the License, or 1255at your option any later version. 1256 1257This program is distributed in the hope that it will be useful, 1258but WITHOUT ANY WARRANTY; without even the implied warranty of 1259MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1260GNU General Public License for more details. 1261 1262You should have received a copy of the GNU General Public License 1263along with this program. If not, see <http://www.gnu.org/licenses/>. 1264 1265Documentation license I 1266======================= 1267 1268 1269Permission is granted to copy, distribute and/or modify this 1270documentation under the terms of the GNU Free Documentation License, 1271Version 1.3 or any later version published by the Free Software 1272Foundation; with no Invariant Sections, with no Front-Cover Texts, and 1273with no Back-Cover Texts. A copy of the license is included in the 1274file LICENSES/GFDL-1.3-or-later.txt. 1275 1276 1277Documentation license II 1278======================== 1279 1280 1281You are free: 1282 1283 1284- \ **to Share**\ 1285 1286 to copy, distribute and transmit the work 1287 1288 1289 1290- \ **to Remix**\ 1291 1292 to adapt the work 1293 1294 1295 1296Under the following conditions: 1297 1298 1299- \ **Attribution**\ 1300 1301 You must attribute the work in the manner specified by the author or 1302 licensor (but not in any way that suggests that they endorse you or 1303 your use of the work). 1304 1305 1306 1307- \ **Share Alike**\ 1308 1309 If you alter, transform, or build upon this work, you may distribute 1310 the resulting work only under the same, similar or a compatible 1311 license. 1312 1313 1314 1315With the understanding that: 1316 1317 1318- \ **Waiver**\ 1319 1320 Any of the above conditions can be waived if you get permission from 1321 the copyright holder. 1322 1323 1324 1325- \ **Public Domain**\ 1326 1327 Where the work or any of its elements is in the public domain under 1328 applicable law, that status is in no way affected by the license. 1329 1330 1331 1332- \ **Other Rights**\ 1333 1334 In no way are any of the following rights affected by the license: 1335 1336 1337 - \* 1338 1339 Your fair dealing or fair use rights, or other applicable 1340 copyright exceptions and limitations; 1341 1342 1343 1344 - \* 1345 1346 The author's moral rights; 1347 1348 1349 1350 - \* 1351 1352 Rights other persons may have either in the work itself or in 1353 how the work is used, such as publicity or privacy rights. 1354 1355 1356 1357 1358 1359 1360- \ **Notice**\ 1361 1362 For any reuse or distribution, you must make clear to others the 1363 license terms of this work. 1364 1365 1366 1367A copy of the full license is included in the file as 1368LICENCES/CC-BY-SA-4.0.txt 1369 1370 1371 1372************ 1373DEPENDENCIES 1374************ 1375 1376 1377\ **env_parallel**\ uses GNU \ **parallel**\ . 1378 1379 1380******** 1381SEE ALSO 1382******** 1383 1384 1385\ **parallel**\ (1), \ **ash**\ (1), \ **bash**\ (1), \ **csh**\ (1), \ **dash**\ (1), 1386\ **fish**\ (1), \ **ksh**\ (1), \ **pdksh**\ (1) \ **tcsh**\ (1), \ **zsh**\ (1). 1387 1388