hi all, i have the following problem using awk in a script
i want to read the values from a column with real numbers and calculate the mean.the problem is that when i use a statement such as this
num = $4
i cant find a way to convert the variable from string to floating point to perform... (7 Replies)
Hi All,
I am getting the output for the following command when i run it on the unix console.
---------------------------
grep `whoami` /etc/passwd | awk '{print ($1);}' | cut -d ":" -f3
----------------------------
But i made it into a script and tried to print the variable, its... (5 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)
Hello,
I have a question regarding the awk command. Here is the line I need to grep:
1 F= -.13250138E+03 E0= -.13249556E+03 d E =-.174650E-01 mag= 35.2157
Instead of displaying the number in red I would like to store it as a variable such as X. Is there a way to do this? Thanks for any... (3 Replies)
I have a text wich looks like this:
clid=2 cid=6 client_database_id=35 client_nickname=Peter client_type=0|clid=3 cid=22 client_database_id=57 client_nickname=Paul client_type=0|clid=5 cid=22 client_database_id=7 client_nickname=Mary client_type=0|clid=6 cid=22 client_database_id=6... (3 Replies)
Hi,
I am trying to perform a simple soustraction between two floating numbers and cannot get it done for some reason due to the use of the sub command.
The following is the straight-forward result of the soustraction:
$ echo | gawk '{a=968;b=967.99;c=a-b;print c}' ... (2 Replies)
Hello All,
I need to extract lines from a file that contains ALPHANUMERIC and the length of Alphanumeric is set to 16. I have pasted the sample of the lines from the text file that I have created.
My problem is that sometimes 16 appears in other part of the line. I'm only interested to... (14 Replies)
I'd like to copy strings from a log file and put them into a CSV.
The strings could be on different line numbers, depending on size of log.
Example Log File:
File = foo.bat
Date = 11/11/11
User = Foo Bar
Size = 1024
...
CSV should look like:
"foo.bat","11/11/11","Foo Bar","1024" (7 Replies)
Hi,
I am new to this world..
Using expect i loging to router and checking ping response to my links.
I need to genarate report using this output and that report contains only three file link name, packet loss, latency.
my output of script is like below:
-bash-3.00$ monmw/mwbkp... (2 Replies)
Hi all, I have a query that runs that outputs data in the following format -
01/09/12 11:43:40,ADMIN,4,77,Application Group Load: Name(TESTED) LoadId(5137-1-0-1XX-15343-15343) File(/dir/dir/File.T03.CI2.RYR.2012009.11433350806.ARD) InputSize(5344) OutputSize(1359) Rows(2) Time(1.9960)... (8 Replies)
Discussion started by: jeffs42885
8 Replies
LEARN ABOUT X11R4
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)