Sponsored Content
Top Forums Shell Programming and Scripting help with grep command or other useful command Post 302159163 by ennstate on Thursday 17th of January 2008 06:39:29 AM
Old 01-17-2008
I assumed that those fields are like NUMBER-NUMBER.NUMBER,but i think the first line of the input file had an
25- 9.21 "space" between them , so it was not included in that calculation.

If you expect that the input may contain space in those fields then,we may hav to change the logic

Thanks
Nagarajan G
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

grep command

Hi, how to search all occurance of keyword in current directory files and sub folder's files also using grep command. thanks (2 Replies)
Discussion started by: avadhani
2 Replies

2. UNIX for Advanced & Expert Users

how to exclude the GREP command from GREP

I am doing "ps -f" to see my process. but I get lines that one of it represents the ps command itself. I want to grep it out using -v flag, but than I get another process that belongs to the GREP itself : I would like to exclude # ps -f UID PID PPID C STIME TTY TIME CMD... (2 Replies)
Discussion started by: yamsin789
2 Replies

3. Shell Programming and Scripting

Help me on Grep Command

Hi, Can anybody explain me about the below mentioned code. grep "^" $FILENAME | cut -c 1-8,84- | awk '{ if (!($2+$3)) printf $1 "," }' >$TEMP_FILENAME Thanks in advance. (3 Replies)
Discussion started by: Kattoor
3 Replies

4. Shell Programming and Scripting

can anyone help with shell script command about searching word with grep command?

i want to search in the current directory all the files that contain one word for example "hello" i want to achieve it with the grep command but not with the grep * (2 Replies)
Discussion started by: aintour
2 Replies

5. Shell Programming and Scripting

Grep Command

Hi, I Want to grep the 500th character of a line in a file. please help on this. Thanks in advance (7 Replies)
Discussion started by: raghulshekar
7 Replies

6. UNIX for Dummies Questions & Answers

grep command - help

I need to find the word "who" in a file but only that word. For instance I don't want it to find the word "whoever." Any suggestions? (2 Replies)
Discussion started by: brooksie91
2 Replies

7. Shell Programming and Scripting

Help with using grep command with copy command

Hi, im taking an entry Unix class, and as part of my lab assignment I have to copy all files in the /home/david/lab3 directory that have the file extension .save to your lab3/temp directory. I'm having trouble getting the grep to do anything worth while I've been trying to do: cp... (6 Replies)
Discussion started by: Critical jeff
6 Replies

8. Shell Programming and Scripting

help with grep command

i have a file which lists the following T2323 T3445 T67666,T6534,T4546 T7878 i need to extract the numeric part only(ie,without T). i tried this script awk '{print substr($0,2,length($0))}' pmt2.txtOutput 2323 3445 67666,T6534,T4546as u can see the numbers coming after "," remains the... (2 Replies)
Discussion started by: born
2 Replies

9. Shell Programming and Scripting

help with grep command

i have the following lines T2345 T3435 - bugfixed and running T5654 fixed and committed T34541:- fixed and committed i need to extract only the T part (eg:T2345) ,ie i dont want any special characters after it. i have been trying with grep and egrep but with no luck. pls help (11 Replies)
Discussion started by: born
11 Replies

10. Shell Programming and Scripting

Grep command giving different result for different users for same command

Hello, I am running below command as root user #nodetool cfstats tests | grep "Memtable switch count" Memtable switch count: 12 Where as when I try to run same command as another user it gives different result. #su -l zabbix -s /bin/bash -c "nodetool cfstats tests | grep "Memtable switch... (10 Replies)
Discussion started by: Pushpraj
10 Replies
ZGREP(1)						      General Commands Manual							  ZGREP(1)

NAME
zgrep - search possibly compressed files for a regular expression SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename... DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code: (-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep. If the GREP environment variable is set, zgrep uses it as the grep program to be invoked. EXIT CODE
2 - An option that is not supported was specified. AUTHOR
Charles Levert (charles@comm.polymtl.ca) SEE ALSO
grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1) ZGREP(1)
All times are GMT -4. The time now is 01:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy