Hi All,
Is it possible in Unix shell script to extract numbers from a string containing ".", such as;
5.2.314
And store in variables so;
var1 = 5
var2 = 2
var3 = 314
Thanks in advance for any help anyone can provide
dave (6 Replies)
Hi all,
Please some help over here. I have a Sales.txt file containing info in blocks for
every sold product in the pattern showed below (only for 2 products).
NEW BLOCK
SALE DATA
PRODUCT SERIAL
79833269999 146701011945004
.Some other data
.Some... (17 Replies)
Hi ppl,
I am a bit lost on this...can some one assist. I know this can be down with awk or sed, but i cant get the exact syntax right.
I need to only extract the numbers from a signle word ( eg abcd.123.xyz )
How can i extract 123 only ?
Thanks (14 Replies)
Hey all,
I ran some simulations, of which the output is 100s of files. I've used grep to extract the vital information needed from the files. This has made my task somewhat easier. But I still need to perform some mathematical calculations (average and geometrical average) on the results of the... (9 Replies)
I need to extract all the p-value numbers and the rho numbers from a .txt file and write them as coma separated values in a new file. Ideally I would get two files in the end, one for p- values and one for rho. Any suggestions? I appreciate your help!!!
The .txt file looks essentially like this... (5 Replies)
I would like to extract a digit from $0 starting 2,30 to 3,99 or 2.30 to 3.99
Can somebody fix this?
awk --re-interval '{if($0 ~ /{1}{2}/) {print FILENAME, substr($0,index($0,/{1}{2}/) , 4)}}'input
abcdefg sdlfkj 3,29 g. lasdfj
alsdfjasl 2.86 gr. slkjds sldkd
lskdjfsl sdfkj kdjlksj 3,34 g... (4 Replies)
Hi,
I am trying to grep/extract the number list from this log file, can I get some help on this. I can grep the word 'href' to see the numbers, but it is resulting with the complete line.
Content of my file:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>... (4 Replies)
Hello friends,I am new to Unix programming.
how do I achieve the following in Unix shell script (I am running ksh on AIX)
extract the number from name of file?
My file format is like "LongFileName-1234.020614-221030.txt"
now I want to extract value which is between (-) hyphen and (.) dot... (4 Replies)
Dear folks
Hello
I have a data set which one of the column of this data set are string and I want to extract numbers which is between two ":". However, I know the substr command which will do this operation but my problem is the numbers between two ":" have different digits. this will make my... (11 Replies)
Hi,
I need to extract part of a text to two variables
text is
"PL/SQL procedure successfully completed. ERROR ----------------------------------------------------------------- Test Error Message PLUSVAR ---------- 1"
I want "Test Error Message" in one variable and "1" in another variable.... (11 Replies)
Discussion started by: vedavrath
11 Replies
LEARN ABOUT PLAN9
zgrep
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)