Search Results

Search: Posts Made By: aKiiY
3,806
Posted By guruprasadpr
Hi Are you looking for something like...
Hi

Are you looking for something like this:

awk -F: 'NF{split($2,a," ");print "Result"i++" "a[1]}' i=1 file

Output:

Result1 0.20777
Result2 0.1414794247

Guru.
3,806
Posted By clx
Assuming you have the same unit always i.e watts...
Assuming you have the same unit always i.e watts and the colon appears only once in a line.

$ eval $(awk '/[a-zA-Z]+:/ { gsub(".*: ", "");gsub(" Watts", "");print "result"NR"="$0}' logfile)
$
$...
3,806
Posted By pravin27
awk -F":" '{print $2}' testfile | awk '$1 ~...
awk -F":" '{print $2}' testfile | awk '$1 ~ /[0-9]/ {print $1}'
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 10:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy