Sponsored Content
Full Discussion: How to grep this pattern??
Top Forums Shell Programming and Scripting How to grep this pattern?? Post 302168851 by askumarece on Tuesday 19th of February 2008 02:12:15 PM
Old 02-19-2008
jim,
thanks a lot.... sorry for making u in confusion....
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to grep the pattern ?

how to grep the pattern ? How can I grep or find the pattern from this files in the directory. I have couple of ascii files too.I have to grep the binary files.Please assist me Thanks Francis (2 Replies)
Discussion started by: faviji
2 Replies

2. Shell Programming and Scripting

how to grep certain pattern

-Hi I have a file with the following entries: tschkback12 tschkback11 tschkback15 tschkback28 ....etc. I need to grep all the lines out of this file which end with the number (just "tschkback" should be excluded). Can it be done with one line command? Thanks -A (5 Replies)
Discussion started by: aoussenko
5 Replies

3. Shell Programming and Scripting

Want to grep for a pattern and display the content above that pattern

Hi, When we have a failure, sometimes we just step restart the job from the next step. Later when we open the log for analysis of the failure, it is becoming difficult to go to the failure part. For eg., if it is a 1000 line log, the failure may be at 500th line. so wat i want to do is, grep... (6 Replies)
Discussion started by: ajayakunuri
6 Replies

4. Emergency UNIX and Linux Support

Grep pattern

I have to search from millions of lines of code of lines having following pattern: get_token , get_token For example: fn1(string.get_token(), string1.get_token()); Thanks in advance (5 Replies)
Discussion started by: uunniixx
5 Replies

5. Shell Programming and Scripting

Grep the word from pattern line and update in subsequent lines till next pattern line reached

Hi, I have got the below requirement. please suggest. I have a file like, Processing Item is: /data/ing/cfg2/abc.txt /data/ing/cfg3/bgc.txt Processing Item is: /data/cmd/for2/ght.txt /data/kernal/config.klgt.txt I want to process the above file to get the output file like, ... (5 Replies)
Discussion started by: rbalaj16
5 Replies

6. Shell Programming and Scripting

How to Grep than scan line below grep pattern

Hello Colleagues, I have a file that looks like below. 6-12731913-12731913 9230760143480 410018547148230 20131002193434+0500 20131002193434+0500 ;20131002T161031000-10.50.241.21-21912131-1419034760, ver: 0 20131009 92220056296730 CC0P abc Core_Context_R1A SMS 6-12726796-12726796... (14 Replies)
Discussion started by: umarsatti
14 Replies

7. Shell Programming and Scripting

sed and awk usage to grep a pattern 1 and with reference to this grep a pattern 2 and pattern 3

Hi , I have a file where i have modifed certain things compared to original file . The difference of the original file and modified file is as follows. # diff mir_lex.c.modified mir_lex.c.orig 3209c3209 < if(yy_current_buffer -> yy_is_our_buffer == 0) { --- >... (5 Replies)
Discussion started by: breezevinay
5 Replies

8. Shell Programming and Scripting

Grep lines before a pattern having some other pattern

Hi All, I am trying to fetch lines before a pattern, I got to know about -B flag in grep but we have to pass the number to get those lines before some pattern say (X), now what if I want to get line/s with some other pattern say (Y) before X pattern? How to get about it? please help. Input:... (5 Replies)
Discussion started by: dips_ag
5 Replies

9. UNIX for Dummies Questions & Answers

Grep -v lines starting with pattern 1 and not matching pattern 2

Hi all! Thanks for taking the time to view this! I want to grep out all lines of a file that starts with pattern 1 but also does not match with the second pattern. Example: Drink a soda Eat a banana Eat multiple bananas Drink an apple juice Eat an apple Eat multiple apples I... (8 Replies)
Discussion started by: demmel
8 Replies

10. UNIX for Beginners Questions & Answers

Grep/awk using a begin search pattern and end search pattern

I have this fileA TEST FILE ABC this file contains ABC; TEST FILE DGHT this file contains DGHT; TEST FILE 123 this file contains ABC, this file contains DEF, this file contains XYZ, this file contains KLM ; I want to have a fileZ that has only (begin search pattern for will be... (2 Replies)
Discussion started by: vbabz
2 Replies
env(1)							      General Commands Manual							    env(1)

NAME
env, printenv - Displays or sets the current environment, or displays the values of environment variables SYNOPSIS
Current Syntax env [-i] [name=value...] [command] [args...] printenv [name] Obsolescent Syntax env [-] [name=value...] [command] [args...] STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: env: XCU5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. OPTIONS
Invokes utility with exactly the environment specified by the arguments; the inherited environment is ignored completely. Changes are in effect only while the specified command is running. Dash is equivalent to -i option. OPERANDS
Changes in the form name=value are added to the current environment before the command is run. [Tru64 UNIX] Name of an environment vari- able to be printed. Name of a command to be invoked with the modified environment. Arguments to be passed to command when it is executed. DESCRIPTION
The env command lets you get and change your current environment, and then run the specified command with the changed environment. If the -i option is used, the current environment is ignored and the command runs with only the changed environment. Changes are only in effect while the specified command is running. If command is not specified, env displays your current environment, one name=value pair per line. [Tru64 UNIX] The printenv command displays the values of the variables in the environment. If name is specified, only its value is printed. If name is not the name of a currently set environment variable, only a blank line is printed, no error is reported. If name is not specified, printenv displays the current environment, one name=value per line. EXIT STATUS
If command is invoked, the exit status of env is the exit status of command; otherwise, the env utility exits with one of the following values: The env utility completed successfully. An error occurred in the env utility. The command specified by command was found but could not be invoked. The command specified by command could not be found. EXAMPLES
To add a shell variable to the environment for the duration of one command (sh only), enter: TZ=MST7MDT date env TZ=MST7MDT date Each of these commands displays the current date and time in Mountain Standard Time. The two commands shown are equivalent. When date is finished, the previous value of TZ takes effect again. To replace the environment with another one, enter: env -i PATH=$PATH IDIR=/u/jim/include LIBDIR=/u/jim/lib make This runs make in an environment that consists only of these definitions for PATH, IDIR, and LIBDIR. You must redefine PATH so that the shell can find the make command. When make is finished, the previous environment takes effect again. To find the current setting of the TERM environment variable, enter: printenv TERM The command returns the value for the TERM environment variable. ENVIRONMENT VARIABLES
The following environment variables affect the execution of env: Provides a default value for the internationalization variables that are unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization vari- ables contain an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string value, overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multibyte characters in arguments). Determines the locale for the for- mat and contents of diagnostic messages written to standard error. Determines the location of message catalogues for the processing of LC_MESSAGES. SEE ALSO
Commands: csh(1), ksh(1), Bourne shell sh(1b), POSIX shell sh(1p) Functions: exec(2) Standards: standards(5) env(1)
All times are GMT -4. The time now is 12:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy