08-21-2015
Quote:
One would need (afaik) a long int or int64, which are both (afaik) not available to the bash shell.
BASH has had 64 bit integers for ages now. Really ancient versions (pre-3.x) won't have it, though, and this only refers to BASH, not Bourne shells in general.
8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have a file of the following format.
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager"/>
<role rolename="admin"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user... (5 Replies)
Discussion started by: nua7
5 Replies
2. UNIX for Dummies Questions & Answers
Here's my work of testing whether a number input is perfect or not..
echo Enter a number
read no
i=1
ans=0
while
do
if
then
ans='expr $ans + $i'
fi
i='expr $i + 1'
done
if
then
echo $no is perfect
else
echo $no is NOT perfect
fi (12 Replies)
Discussion started by: Cyansnow
12 Replies
3. AIX
I've got an aix-box somewhere on the network and a PC on my desk. Nothing fancy so far.
The PC is made dual-boot:
- windowsXP with putty & winSCP
or
- slackware 13 with xfce4 installed.
The aix-box runs DB2 v8.2 and I've installed db2top to monitor the database.
db2top is a character... (0 Replies)
Discussion started by: dr_te_z
0 Replies
4. Shell Programming and Scripting
Hi All,
I have a text file which looks like this:
computer programming
systems engineering
I want to get rid of these square brackets and also the text that is inside these brackets. So that my final text file looks like this:
computer programming
systems engineering
I am using... (3 Replies)
Discussion started by: shoaibjameel123
3 Replies
5. Shell Programming and Scripting
hi,
how to I do this?
i="4.000"
if ; then
echo "smaller"
fi
how do I convert the "4.000" to 4?
Thanks! (4 Replies)
Discussion started by: h0ujun
4 Replies
6. UNIX for Dummies Questions & Answers
I want to print only the lines that meet the criteria : "worde:" and "wordo;"
I got this far:
sed -n '/\(*\)\1e:\1o;/p;'
But it doesn't quite work.
Can someone please perfect it and tell me exactly how its a fixed version/what was wrong with mine?
Thanks heaps, (1 Reply)
Discussion started by: maximus73
1 Replies
7. Shell Programming and Scripting
Hi
Input File A
L006 AL01 0 (OCK)
L006 A006 0 (OCK)
L011 AR11 1 (NLOCK)
Input File B
L006 AL01 0 (OCK)
L006 A006 0 (OCK)
Need Egrep Command for perfect Match
Thanks (4 Replies)
Discussion started by: asavaliya
4 Replies
8. Shell Programming and Scripting
I have to find last delimiter in each line of a file and store the value after the last '/' in a variable in ksh script...Pls Pls help me:(The file is as shown below:
/opt/apps/cobqa/apps/abadv/bind/advc0007.bnd
/opt/apps/cobqa/apps/abbrio/bind/naac6115.bnd... (5 Replies)
Discussion started by: bhavanabahety
5 Replies
LEARN ABOUT CENTOS
funcolumnlookup
funcolumnlookup(3) SAORD Documentation funcolumnlookup(3)
NAME
FunColumnLookup - lookup a Funtools column
SYNOPSIS
#include <funtools.h>
int FunColumnLookup(Fun fun, char *s, int which,
char **name, int *type, int *mode,
int *offset, int *n, int *width)
DESCRIPTION
The FunColumnLookup() routine returns information about a named (or indexed) column. The first argument is the Fun handle associated with
this set of columns. The second argument is the name of the column to look up. If the name argument is NULL, the argument that follows is
the zero-based index into the column array of the column for which information should be returned. The next argument is a pointer to a
char *, which will contain the name of the column. The arguments that follow are the addresses of int values into which the following
information will be returned:
o type: data type of column:
o A: ASCII characters
o B: unsigned 8-bit char
o I: signed 16-bit int
o U: unsigned 16-bit int (not standard FITS)
o J: signed 32-bit int
o V: unsigned 32-bit int (not standard FITS)
o E: 32-bit float
o D: 64-bit float
o mode: bit flag status of column, including:
o COL_ACTIVE 1 is column activated?
o COL_IBUF 2 is column in the raw input data?
o COL_PTR 4 is column a pointer to an array?
o COL_READ 010 is read mode selected?
o COL_WRITE 020 is write mode selected?
o COL_REPLACEME 040 is this column being replaced by user data?
o offset: byte offset in struct
o n: number of elements (i.e. size of vector) in this column
o width: size in bytes of this column
If the named column exists, the routine returns a positive integer, otherwise zero is returned. (The positive integer is the index+1 into
the column array where this column was located.)
If NULL is passed as the return address of one (or more) of these values, no data is passed back for that information. For example:
if( !FunColumnLookup(fun, "phas", 0, NULL NULL, NULL, NULL, &npha, NULL) )
gerror(stderr, "can't find phas column
");
only returns information about the size of the phas vector.
SEE ALSO
See funtools(7) for a list of Funtools help pages
version 1.4.2 January 2, 2008 funcolumnlookup(3)