Sponsored Content
Full Discussion: Greater Than
Top Forums Shell Programming and Scripting Greater Than Post 39749 by Lem2003 on Friday 29th of August 2003 09:19:13 AM
Old 08-29-2003
Java Greater Than

Hello every one! I need a little help. I would like to know if there is someway I can use a "greater than" condition in a shell script.

Code:
#!/usr/bin/sh
_curTime=`date +%H%M`
if [_curTime<2400] && [_curTime>0800]
then
        echo "$_curTime"
fi

I know that "<" and ">" is to input and output to a file I just wanted to ilustrate my example.

Thank you all!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

greater than less than in case

Hi , I want to do the following: i=6 case $i in -lt 10) echo Period=10 ;; -gt 10 && -lt 15) echo Period-15 ;; >15 && <20) echo Period=20 ;; >20 && <30) ... (2 Replies)
Discussion started by: sars
2 Replies

2. Shell Programming and Scripting

AWK greater than?

Sorry for such a basic question, but I have spent hours trying to work this out! I need an awk command (or similar) that will look at a text file and output to the screen if the 4th column of each line has a value greater than or equal to x. data.txt This is the 1 line This is the 2 line This... (6 Replies)
Discussion started by: dlam
6 Replies

3. UNIX for Dummies Questions & Answers

Print lines which are greater than

I have a file which has a list of titles and then 14 lines afterwards. I need to find the 1 through 14 lines which are greater than 15k and print the title and the line which matched. Sample before: ABC.CDE.NORTH.NET 1:18427 2:302 3:15559 4:105 5:5 6:2 7:2 8:2 9:4 10:2 11:17 12:2... (3 Replies)
Discussion started by: numele
3 Replies

4. Shell Programming and Scripting

Problem with Greater Than Or Equal To

BASH problem with IS GREATER THAN OR EQUAL TO. I have tried a dozen variations for this IF statement to work with IS GREATER THAN OR EQUAL TO. My code below WORKS. array=( $( /usr/bin/sar -q 1 30 |grep Average |awk '{print $2,$3}' ) ) nthreads="${array}" avproc="${array}" if && ; then ... (6 Replies)
Discussion started by: diex
6 Replies

5. Shell Programming and Scripting

find greater than value

Hi I want to find greater than and min value. dategrep() { varlinenum=$1 varSESSTRANS_CL="$(egrep -n "<\/SESSTRANSFORMATIONINST>" tmpsess9580.txt | cut -d":" -f1)" echo $varSESSTRANS_CL } dategrep 8 Output of the above command is: I want to find out greater than 8 and... (9 Replies)
Discussion started by: tmalik79
9 Replies

6. Shell Programming and Scripting

greater than a certain value

I have an output from db which looks like : row1 row2 row3 abc 21.1 13 efg 21.1 45 ghi 21.1 75 when I apply following command ( cat my_output.txt | awk {'print $ 4' } I have following output : row3 13 45 75 now I want to figure out if... (4 Replies)
Discussion started by: kvok
4 Replies

7. Shell Programming and Scripting

How to search for numbers greater than x?

I have a file with multiple fields, example below File 1: Field 1|Field 2|Field 3|Field 4|Field 5|Field 6|Field 7|100 Field 1|Field 2|Field 3|Field 4|Field 5|Field 6|Field 7|101 Field 1|Field 2|Field 3|Field 4|Field 5|Field 6|Field 7|102 Field 1|Field 2|Field 3|Field 4|Field 5|Field... (4 Replies)
Discussion started by: castrojc
4 Replies

8. Shell Programming and Scripting

awk to get values greater than

data.txt August 09 17:16 2013 August 09 17:17 2013 August 09 17:19 2013 August 09 17:20 2013 August 09 17:21 2013 August 09 17:22 2013 August 09 17:23 2013 August 09 17:24 2013 to print from a point in this file, to the end of the file, i type: awk '/August 09 17:22/,0' data.txt. ... (1 Reply)
Discussion started by: SkySmart
1 Replies

9. Shell Programming and Scripting

Find and substitute if greater than.

I have large config-files for an application. The lines have different structure, but some of them contains the parameter 'TIMEOUT=x', where x is an numeric value. I want to change the value for that specific paramater if the value is greater than a specific value (got that?). The timeout-parameter... (3 Replies)
Discussion started by: useless
3 Replies

10. UNIX for Dummies Questions & Answers

Greater than specific number

please let me know how to construct if then else by comparing two numbers if it is greater than 10000. I need to do some specific task executed. can you help me out in shell scripting plz. (6 Replies)
Discussion started by: ramkumar15
6 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 06:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy