Sponsored Content
Top Forums Shell Programming and Scripting Is there a way to make bash [or another shell] use all CPU cores to execute a single script? Post 302389985 by ph0enix on Tuesday 26th of January 2010 02:30:30 PM
Old 01-26-2010
Quote:
Originally Posted by Corona688
Converting it to C won't make it multithreaded either. You need to learn what multiprocessing and multithreading is.
I have a pretty good idea of what they are. Coding is another story.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to execute sh script in bash shell via crontab

hello. we are porting over from HPUX Shell to Linux. my default shell is bash so i can no longer schedule to execute a sh script in crontab. can anyone pls help me out? I searched the site but didnt find any details. thanks! (1 Reply)
Discussion started by: jigarlakhani
1 Replies

2. Shell Programming and Scripting

Help with make sure shell script execute instruction in flow

Hi, I want to write a shell script to make sure all the instruction is executive in flow. eg. I want my shell script to run finish this two progress first: ./program input_file_1.txt > input_file_1.txt.out & ./program input_file_2.txt > input_file_2.txt.out & After then, only run the... (1 Reply)
Discussion started by: edge_diners
1 Replies

3. Red Hat

Lost CPU CORES

Hey all, dmidecode | grep -i CPU Socket Designation: CPU 0 Version: Intel(R) Xeon(R) CPU E5530 @ 2.40GHz Socket Designation: CPU 1 Version: Intel(R) Xeon(R) CPU E5530 @ 2.40GHz cat /proc/cpuinfo | grep -i cpu cpu family : 6... (24 Replies)
Discussion started by: rmokros
24 Replies

4. UNIX for Dummies Questions & Answers

how to run two unix/linux programs on two different cpu cores

Hi folks, I want to know how to run two unix programs on two different cpu cores on a 2-core or 4-core or 8-core CPU machine? Extending this how would i run four and eight unix programs on 4-core and 8-core machine respectively? If this can be done, how to know which program is assigned to... (1 Reply)
Discussion started by: kaaliakahn
1 Replies

5. Shell Programming and Scripting

How to make a bash or shell script run as daemon?

Say i have a simple example: root@server # cat /root/scripts/test.sh while sleep 5 do echo "how are u mate" >> /root/scripts/test.log done root@server # Instead of using rc.local to start or another script to check status, I would like make it as daemon, where i can do the following: ... (2 Replies)
Discussion started by: timmywong
2 Replies

6. Solaris

CPU/processor/cores in M4000

Hi Gurus Can someone help me in explaining the below outputs . psrinfo -p 4 /usr/sbin/psrinfo -pv The physical processor has 4 virtual processors (0-3) SPARC64-VI (portid 1024 impl 0x6 ver 0x93 clock 2150 MHz) The physical processor has 4 virtual processors (8-11) SPARC64-VI... (3 Replies)
Discussion started by: ningy
3 Replies

7. Solaris

Numbers-of-cpu-cores-in-Solaris-10

Hello All, How do I find the number of CPU's, virtual processors in solaris 10? Thank you Sunil Kumar (2 Replies)
Discussion started by: msgforsunil
2 Replies

8. Red Hat

CPU and Cores information

Hi all. I have a question about linux command to find number of CPU and Core. I usually use the command dmidecode -t processor to find cpu and core numbers . On this machine with Red Hat 4. 0 when I try to insert the command is returned the error -bash: dmidecode: command not found I try to... (8 Replies)
Discussion started by: piccolinomax
8 Replies

9. Solaris

Questions regarding CPU cores vs rctl limit

Hi, I am trying to gather cpu core details and used this script - Solaris & Scripting: Script - Find cpu - model / type / count / core / thread / speed - Solaris Sparc For auuditing purpose, we want to know how many cores are being used by Oracle, because oracle license will be charged on... (2 Replies)
Discussion started by: solaris_1977
2 Replies
NPM-RUN-SCRIPT(1)														 NPM-RUN-SCRIPT(1)

NAME
npm-run-script - Run arbitrary package scripts SYNOPSIS
npm run-script <command> [--silent] [-- <args>...] alias: npm run DESCRIPTION
This runs an arbitrary command from a package's "scripts" object. If no "command" is provided, it will list the available scripts. run[-script] is used by the test, start, restart, and stop commands, but can be called directly, as well. When the scripts in the package are printed out, they're separated into lifecycle (test, start, restart) and directly-run scripts. As of ` https://blog.npmjs.org/post/98131109725/npm-2-0-0, you can use custom arguments when executing scripts. The special option -- is used by getopt https://goo.gl/KxMmtG to delimit the end of the options. npm will pass all the arguments after the -- directly to your script: npm run test -- --grep="pattern" The arguments will only be passed to the script specified after npm run and not to any pre or post script. The env script is a special built-in command that can be used to list environment variables that will be available to the script at run- time. If an "env" command is defined in your package, it will take precedence over the built-in. In addition to the shell's pre-existing PATH, npm run adds node_modules/.bin to the PATH provided to scripts. Any binaries provided by locally-installed dependencies can be used without the node_modules/.bin prefix. For example, if there is a devDependency on tap in your package, you should write: "scripts": {"test": "tap test/*.js"} instead of "scripts": {"test": "node_modules/.bin/tap test/*.js"} to run your tests. The actual shell your script is run within is platform dependent. By default, on Unix-like systems it is the /bin/sh command, on Windows it is the cmd.exe. The actual shell referred to by /bin/sh also depends on the system. As of ` https://github.com/npm/npm/releases/tag/v5.1.0 you can customize the shell with the script-shell configuration. Scripts are run from the root of the module, regardless of what your current working directory is when you call npm run. If you want your script to use different behavior based on what subdirectory you're in, you can use the INIT_CWD environment variable, which holds the full path you were in when you ran npm run. npm run sets the NODE environment variable to the node executable with which npm is executed. Also, if the --scripts-prepend-node-path is passed, the directory within which node resides is added to the PATH. If --scripts-prepend-node-path=auto is passed (which has been the default in npm v3), this is only performed when that node executable is not found in the PATH. If you try to run a script without having a node_modules directory and it fails, you will be given a warning to run npm install, just in case you've forgotten. You can use the --silent flag to prevent showing npm ERR! output on error. You can use the --if-present flag to avoid exiting with a non-zero exit code when the script is undefined. This lets you run potentially undefined scripts without breaking the execution chain. SEE ALSO
o npm help 7 scripts o npm help test o npm help start o npm help restart o npm help stop o npm help 7 config January 2019 NPM-RUN-SCRIPT(1)
All times are GMT -4. The time now is 08:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy