Search Results

Search: Posts Made By: fbg
6,958
Posted By fbg
Thanks pludi, my ksh was updated to...
Thanks pludi, my ksh was updated to ksh-20080202-2.el5 from a 2006 version. Now my old scripts are all crashing with this. The older version was more flexible, I think.
6,958
Posted By fbg
I have another one
I have

n=23

then I do

nan=`grep -c -i 'NaN' file`

so that nan is a variable with the number of lines with the field "NaN" in file. Then I do

(( n = n - nan ))

and when nan=0,...
6,958
Posted By fbg
Thanks! I just wanted to understand...
Thanks! I just wanted to understand...
6,958
Posted By fbg
strange ksh arithmetic
Hello,

I would like to understand this... I'm using ksh and doing

(( z = y - 1 ))

if y=34, then the result for z is 33, but if y=034 the result is z=27. Why??

Thanks
12,611
Posted By fbg
I could find the answer in other post. Need to...
I could find the answer in other post. Need to do:

echo 40 | awk ' { comm="test.sh "$1; comm | getline y; close(comm); print y } '

Is a nice trick
12,611
Posted By fbg
awk and system getline
Hello,

Need some help here. I have this script (test.sh):

#!/bin/sh
var=$1
(( var = 2 * var ))
echo $var

Now I want to call this script from awk with one argument and then capture the...
Showing results 1 to 6 of 6

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