Sponsored Content
Top Forums Shell Programming and Scripting Time taken to run grep in different OS Post 302835877 by Don Cragun on Tuesday 23rd of July 2013 06:38:04 AM
Old 07-23-2013
Quote:
Originally Posted by Skrynesaver
OS is a factor, as is filesystem, amount of free memory (esp. for Linux's read ahead ), I recommend faster disk storage or flash drives if you want to read files faster Smilie
grep is a pretty optimised command as it is...

Edit: Actually, on the locale issue, make sure "LC_COLLATE=Posix" if you're using ranges in grep.
Case matters in locale names. The POSIX Locale is all caps. Furthermore, on systems that conform to the IEEE's and ISO's POSIX Standards or The Open Group's Single UNIX Specifications, the C Locale and the POSIX Locale are identical. So LC_COLLATE=C and LC_COLLATE=POSIX have exactly the same effect. LC_COLLATE=Posix might have the same effect, might yield an error, or might be a completely different locale on some systems; but it has no defined meaning in the standards.

On systems that conform to the C standard but neither the POSIX Standards nor the Single UNIX Specifications, the requirements for the C Locale are not as stringent and there is no definition for, nor any requirement that there even be, a POSIX Locale.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

run script in autosys at a specified time.

I have created a shell script. I want to run the script in Autosys. Please note my shell script runs as "$ ksh run.ksh" How do I make autosys run this script at 5:00PM every day? insert_job: abc job_type: c box_name: run.box command: ksh run.ksh machine: mach1 #owner: mach1@mymach... (1 Reply)
Discussion started by: gram77
1 Replies

2. Shell Programming and Scripting

Run script at same time

Hi My five script run throgh crontab at same time at 6 clock. Due to problem in the data load .Now I want to check time of load finish run these jobs. I create a script which check the load finish time but I have no idea how I run these JObs. This is very urget to me. Please reply me as soon... (3 Replies)
Discussion started by: Jamil Qadir
3 Replies

3. Shell Programming and Scripting

run script for given time

Hi! I need to run my script for a specific number of time, as specified by the user: For instance, if the user specified 10, my script should run for until 10 seconds expire. How do I do this? (0 Replies)
Discussion started by: looza
0 Replies

4. Shell Programming and Scripting

Run several commands at a time

Hello guys, I am new at shell scripting and I want to create a script that runs several commands at a time, ie: uptime, w, df -h and so on and send the output of this commands to a text file so it can be send via email at a certain time using crontab. Any help will be much appreciated! (4 Replies)
Discussion started by: agasamapetilon
4 Replies

5. Shell Programming and Scripting

last run time of any script

how to find when last time a scrit has ran? (7 Replies)
Discussion started by: RahulJoshi
7 Replies

6. Programming

Run time Debugging

We have recently downloaded, installed and compiled gcc-3.0.4 code. gcc compiler has built successfully and we where able to compile some same test cpp file. I would like to know how we can modify gcc source code so that we add additional run time debugging statements like the binary in execution... (4 Replies)
Discussion started by: uunniixx
4 Replies

7. AIX

time of a particular command run

Hello all, I need to find, what time a particular command was run in one of our AIX box. In our environment, we use 'powerbroker' to login as root and there are so many people who use this. I tried history command, which shown me similar to below: 406 ls -l | *user* 407 ls -l... (1 Reply)
Discussion started by: gsabarinath
1 Replies

8. Solaris

Java Run Time

I have installed IBM Java Runtime V1.4.2 in solaris. but when i give java -version, it gets me this:java version "1.5.0_20" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_20-b02) Java HotSpot(TM) Client VM (build 1.5.0_20-b02, mixed mode, sharing) can you please tell me how do i... (3 Replies)
Discussion started by: ichwaiznicht
3 Replies

9. Shell Programming and Scripting

Can we run tail -f for a specified time?

Hi all, I want to check a log file that gets updated very frequently, almost every second. What I want to do from a script is to check this log file 1) for a particular string 2) for a specified time while it is getting updated. And as soon as it finds that particular string the command... (4 Replies)
Discussion started by: pat_pramod
4 Replies

10. Shell Programming and Scripting

Substitute grep command at run time

HI I am trying to use the following code in the shell script (using grep) usage() { echo "Usage: ./$0 <file name> <interval> <pattern>" } METRICS_FILE=$1 INTERVAL=$2 PATTERN="$3" .. if then PATTERN="grep Gx" fi COUNT=`cat ${METRICS_FILE} | "${PATTERN}" |egrep... (8 Replies)
Discussion started by: asifansari
8 Replies
ISCNTRL(3P)						     POSIX Programmer's Manual						       ISCNTRL(3P)

PROLOG
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the correspond- ing Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux. NAME
iscntrl, iscntrl_l -- test for a control character SYNOPSIS
#include <ctype.h> int iscntrl(int c); int iscntrl_l(int c, locale_t locale); DESCRIPTION
For iscntrl(): The functionality described on this reference page is aligned with the ISO C standard. Any conflict between the requirements described here and the ISO C standard is unintentional. This volume of POSIX.1-2008 defers to the ISO C standard. The iscntrl() and iscntrl_l() functions shall test whether c is a character of class cntrl in the current locale, or in the locale repre- sented by locale, respectively; see the Base Definitions volume of POSIX.1-2008, Chapter 7, Locale. The c argument is a type int, the value of which the application shall ensure is a character representable as an unsigned char or equal to the value of the macro EOF. If the argument has any other value, the behavior is undefined. The behavior is undefined if the locale argument to iscntrl_l() is the special locale object LC_GLOBAL_LOCALE or is not a valid locale object handle. RETURN VALUE
The iscntrl() and iscntrl_l() functions shall return non-zero if c is a control character; otherwise, they shall return 0. ERRORS
No errors are defined. The following sections are informative. EXAMPLES
None. APPLICATION USAGE
To ensure applications portability, especially across natural languages, only these functions and the functions in the reference pages listed in the SEE ALSO section should be used for character classification. RATIONALE
None. FUTURE DIRECTIONS
None. SEE ALSO
isalnum(), isalpha(), isblank(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit(), setlocale(), use- locale() The Base Definitions volume of POSIX.1-2008, Chapter 7, Locale, <ctype.h>, <locale.h> COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2013 Edition, Standard for Information Technol- ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, Copyright (C) 2013 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. (This is POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Stan- dard is the referee document. The original Standard can be obtained online at http://www.unix.org/online.html . Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html . IEEE
/The Open Group 2013 ISCNTRL(3P)
All times are GMT -4. The time now is 10:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy