Search Results

Search: Posts Made By: homefp
19,154
Posted By homefp
here is my own solution : result=`cat...
here is my own solution :

result=`cat $filein | awk '{print $3}' | sed s/0x//g | tr [a-z][A-Z]`
result=`echo "obase=10;ibase=16;$result" | bc | awk '{bytes = bytes + $1} END {print bytes}' `...
19,154
Posted By homefp
Really sorry ZB, I didn't mean it... My...
Really sorry ZB, I didn't mean it...

My concern is that I don't know how to initialize the variables (typeset...with awk).
Ciao.
19,154
Posted By homefp
thanks, how then would I replace the...
thanks,

how then would I replace the following :

awk '{m+=$1}END{print m}' numbers

with hexa numbers in $1 field ?

I need to have it as simple as possible in a shell script.
19,154
Posted By homefp
Hi there, does someone knows about such a...
Hi there,

does someone knows about such a simple method to add hexadecimal numbers using awk ?

thanks,
homefp
48,989
Posted By homefp
this was just to finalize my need... I was...
this was just to finalize my need...
I was wondering if in a single sed command it would be possible to remove several lines starting from my label :
the following :
sed '/label/{N;N;d;}' < input...
48,989
Posted By homefp
In fact one line command only to replace...
In fact one line command only to replace sequential sed commands as :

sed '/labe/{n;n;d;}' < filein > fileout; mv fileout filein
sed '/label/{n;d;}' < filein > fileout; mv fileout filein
sed...
48,989
Posted By homefp
Thanks a lot !!! :) This works perfectly as...
Thanks a lot !!! :)
This works perfectly as expected.

Is there as well such a single sed command to remove several lines starting from my "label" line after all ?
May be something like : sed...
48,989
Posted By homefp
sed/awk to insert comment at defined line number
Hi there,

may someone easily help me on this :

I want to insert a text in a specific line number like :

linenumb2start=`cat memory_map.dld | nl -ba | egrep -i "label" | cut -f1`
...
3,741
Posted By homefp
I'm using sh and both are working $# = number...
I'm using sh and both are working
$# = number of args
#@ = all args together

my problem is : how to use them ?!
My tests are giving me wrong results !
I need to find my args as a sentence in...
3,741
Posted By homefp
does not work or I don't know how to manage this...
does not work or I don't know how to manage this !.....sorry ! :rolleyes:

egrep_source argument="-ni $@" gives me an empty output...
and using $# is tricky as I don't know how many arguments...
3,741
Posted By homefp
Thanks perderabo, of course I already tried...
Thanks perderabo,
of course I already tried this but here is my concern :
in fact i'm using the following command :
egrep_source argument="-ni $1" where egrep_source is an embedded egrep working...
3,741
Posted By homefp
thanks but, in my loc i do the following : ...
thanks but,

in my loc i do the following :

egrep " -ni $1"

and $1 is egual to arg1 arg2 arg3 arg4 which does not give what expected of course.
I tried egrep " -ni `$1`" and other ways but...
3,741
Posted By homefp
several arguments together
Hello guys,

you may help me on this :

I want to search thru many files if a sentence or a string exists and printout the lines where this is present by calling a script like :

loc "arg1 arg2...
4,480
Posted By homefp
Thanks Jimbo for your help. It seems to work...
Thanks Jimbo for your help.
It seems to work perfectly !
Have a nice day.:p
4,480
Posted By homefp
Sorry, I did something wrong.....:confused: ...
Sorry,
I did something wrong.....:confused:

here is what I get:
cin **> comm2.uc ...................................cin **> comm2.uc => Line 208 : (* the user should call Get_Time_LoW, which...
4,480
Posted By homefp
Hi Jimbo, with your script , I get something...
Hi Jimbo,
with your script , I get something like:
4,480
Posted By homefp
Hi Jimbo, sorry for the delay but I'm just back...
Hi Jimbo,
sorry for the delay but I'm just back from vacation....some fresh air will help to think....
My platform is Sun Solaris OS 5.5.1 on Ultra 5.

Your solution does not work fine. Columns...
4,480
Posted By homefp
I still receive an error message : awk:...
I still receive an error message :

awk: can't set $0
record number 1

here is a right copy of my original line :
src**>...hwi_adc.....=>...Line...332:..../*..comments.....*/...
4,480
Posted By homefp
Thanks Jimbo, I'm going to try asap. Have a...
Thanks Jimbo,
I'm going to try asap.
Have a nice day :) :D :)
4,480
Posted By homefp
sed to have defined positionning on line
Hi,
I'd like to know how to use sed to position my output to a defined location on a line.

Here is my example:
A: filename.txt => line x : comment fromA
B: very longfilename.txt => line xyzabd...
Showing results 1 to 20 of 20

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