Sponsored Content
Top Forums UNIX for Dummies Questions & Answers alternative to the grep trick Post 302585046 by pandeesh on Tuesday 27th of December 2011 07:07:34 AM
Old 12-27-2011
Thanks!It's awesome!
Code:
$ export a=sched
$  ps -ef|grep `echo $a | sed "s/^\(.\)/[\1]/"`
    root     0     0  0   Oct 23 ?        0:26 sched

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Stupid find trick

At work, we use a software development product (from a company that will remain nameless, but whose name may be considered a synonym for "logical"). The development trees are organized beneath a top directory, let's call it "$rat". The first level under $rat contains the major system names, and... (2 Replies)
Discussion started by: criglerj
2 Replies

2. UNIX for Dummies Questions & Answers

Grep alternative to handle large numbers of files

I am looking for a file with 'MCR0000000716214' in it. I tried the following command: grep MCR0000000716214 * The problem is that the folder I am searching in has over 87000 files and I am getting the following: bash: /bin/grep: Arg list too long Is there any command I can use that can... (6 Replies)
Discussion started by: runnerpaul
6 Replies

3. Shell Programming and Scripting

Alternative to grep

How to find a particular line in a file without using grep? (3 Replies)
Discussion started by: proactiveaditya
3 Replies

4. Shell Programming and Scripting

Need best grep option or alternative

Hello, I am processing a text file which contains only words with few combination of characters (it is a dictionary file). example: havana have haven haven't havilland havoc Is there a way to exclude only 1 to 8 character long words which not include space or special characters : '-`~.. so... (5 Replies)
Discussion started by: alekkz
5 Replies

5. Shell Programming and Scripting

Any trick to speed up script?

Hi Guys, I have a script that I am using to convert some text files to xls files. I create multiple temp. files in the process of conversion. Other than reducing the temp. files, are there any general tricks to help speed up the script? I am running it in the bash shell. Thanks. (6 Replies)
Discussion started by: npatwardhan
6 Replies

6. Shell Programming and Scripting

Please suggest alternative to grep

Hi Experts, PFB my requirement: I have a file (named file1) containing numbers like: 372846078543002 372846078543003 372846078543004 372846078543005 372846078543006 I have another file (nemed file2)where lines containing these numbers(present in file1) are present; Eg: lppza087; <PERFB >... (6 Replies)
Discussion started by: niladri29
6 Replies

7. Programming

Oracle TRICk Question

HI Guys , Below are the two columns ITEMS and STATE of table . ITEMS STATE '2345','ggdh','k5tg','dgyt','hFF' DF '1234','ghyt','DDD','GHTD','ABF' PQ Can we get output in PL/SQL in below way ?... (7 Replies)
Discussion started by: Perlbaby
7 Replies

8. Shell Programming and Scripting

Alternative command to grep -w option

Hi All, We have few scripts where we are using grep -w option to do exact matching of the pattern. This works fine on most of our servers. But I have encounter a very old HP-UX System(HP-UX B.11.00) where grep -w option is not available. This is causing my scripts to fail. I need to change... (7 Replies)
Discussion started by: veeresh_15
7 Replies

9. Shell Programming and Scripting

Help with grep, or alternative

say I have a big list of something like: sdg2000 weghre10 fewg53 gwg99 jwegwejjwej43 afg10293 I want to remove the numbers of any line that has letters + 1 to 4 numbers output: sdg weghre fewg gwg jwegwejjwej afg10293 (7 Replies)
Discussion started by: Siwon
7 Replies
sched.h(3HEAD)							      Headers							    sched.h(3HEAD)

NAME
sched.h, sched - execution scheduling SYNOPSIS
#include <sched.h> DESCRIPTION
The <sched.h> header defines the sched_param structure, which contains the scheduling parameters required for implementation of each sup- ported scheduling policy. This structure contains the following member: int sched_priority process execution scheduling priority Each process is controlled by an associated scheduling policy and priority. Associated with each policy is a priority range. Each policy definition specifies the minimum priority range for that policy. The priority ranges for each policy may overlap the priority ranges of other policies. The scheduling policies are indicated by the values of the following symbolic constants: SCHED_FIFO Processes are scheduled according to the First-In-First-Out (FIFO) policy. Processes scheduled to this policy, if not pre- empted by a higher priority or interrupted by a signal, will proceed until completion. SCHED_RR Processes are scheduled according to the Round-Robin (RR) policy. Processes scheduled to this policy, if not pre-empted by a higher priority or interrupted by a signal, will execute for a time period, returned by sched_rr_get_interval(3RT) or by the system. SCHED_IA Processes are scheduled according to the Inter-Active Class (IA) policy as described in priocntl(2). SCHED_OTHER Processes are scheduled according to another policy not described above. The values of these constants are distinct. Inclusion of the <sched.h> header will make visible symbols defined in the header <time.h>. SEE ALSO
priocntl(2), sched_rr_get_interval(3RT), time.h(3HEAD) SunOS 5.10 4 Oct 2001 sched.h(3HEAD)
All times are GMT -4. The time now is 09:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy