09-24-2007
Homework?
1. atol
2. sprintf/write
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I have a source file with 'Aug 1 2004' kind format.
I need to search the records with certain period, like from Aug 1 2004 to Sep 20 2004.
Can someone give me some ideas what I should start with?
ThanX !! (1 Reply)
Discussion started by: whatisthis
1 Replies
2. Shell Programming and Scripting
We use the MS access database, I want to convert the database to mysql db , could suggest is there any tools / methods that I can export the table and data from access , and import it to the new mysql db ? thx in advance. (3 Replies)
Discussion started by: ust
3 Replies
3. Shell Programming and Scripting
I have my main script calling another script to retrive a "ls -alt" of a directory that's located in a remote location I'm sftping into.
main.sh
#!/bin/ksh
getLS.sh > output.txt
getLS.sh
#!/bin/sh
/home<..>/sftp <host@ip> <<!
cd /some/dir/Log
ls -alt
quit
!
Basically I'd like to be... (2 Replies)
Discussion started by: yongho
2 Replies
4. Shell Programming and Scripting
hello,
my objective is to calculate the swap size
-bash-3.00# swap -l
swapfile dev swaplo blocks free
/dev/md/dsk/d1 85,1 8 33559776 16966160
so size=blocks*512/(1024*1024*1024)
since blocks are 512-blocks
any idea how to get it?
so far I was able to... (6 Replies)
Discussion started by: melanie_pfefer
6 Replies
5. Shell Programming and Scripting
how to convert this perl expression to Python
while (<FIL>) {
s/+/ /g;
if (/<DOC\s+doc_ID=\"(.*?)\".*sys_ID=\"(.*?)\"/i) { #"
${$$hashptr{$sys_Id}}{$doc_Id} = $docstr; #
push(@$doclistptr, $doc_Id);
$doc_Id = $1;
$sys_Id = $2;
$docstr = "";
... (1 Reply)
Discussion started by: jaganadh
1 Replies
6. Shell Programming and Scripting
Hi,
I am using awk to get particular dates in seconds and the output am getting is like 1.28071e+09.
How can I convert it to number format.
Can anyone help me out?
Thanks in advance..! (7 Replies)
Discussion started by: Kattoor
7 Replies
7. Shell Programming and Scripting
If I pass the value in the form YYYY/MM/DD(20100719) how to convert in the form 19\/Jul\/2010 (1 Reply)
Discussion started by: sandy1028
1 Replies
8. Shell Programming and Scripting
Hi,
In my input variable values are c:/test/sample/
I need to convert it to c:\test\sample
I need to find and replace it
How do I do it?
var_conversion=`"$var_SearchFile" | sed 's/'\'/'/'/g'`
echo ${var_conversion%/*}
My code throws error (4 Replies)
Discussion started by: magesh_bala
4 Replies
9. Linux
Can someone translate this code to .bat for me? I have no clue.
#!/bin/sh
WAS_HOME="/opt/websphere/appserver/profiles/AppSrv01"
WAS_APP_SERVER="server1"
WAS_PROFILE_NAME="AppSrv01"
echo "Stopping App Server"
"${WAS_HOME}/bin/stopServer.sh" -profileName $WAS_PROFILE_NAME $WAS_APP_SERVER... (1 Reply)
Discussion started by: Blogger11
1 Replies
10. UNIX for Dummies Questions & Answers
my file or content of the file looks like this:
HR-BUSPARTNET
SC-POINQUIRY
BATCH
FIN-CHOPDATARESTRICT
HR-DATABASEACCESSNOEXEC
GL-EXTINQ
RSS
SC-APPROVER
ESS
all said and done, i'd like to have it look like this:
... (6 Replies)
Discussion started by: lawsongeek
6 Replies
ATOL(3) BSD Library Functions Manual ATOL(3)
NAME
atol, atoll, atol_l, atoll_l -- convert ASCII string to long or long long integer
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <stdlib.h>
long
atol(const char *str);
long long
atoll(const char *str);
#include <xlocale.h>
long
atol_l(const char *str, locale_t loc);
long long
atoll_l(const char *str, locale_t loc);
DESCRIPTION
The atol() function converts the initial portion of the string pointed to by str to long integer representation.
It is equivalent to:
strtol(str, (char **)NULL, 10);
The atoll() function converts the initial portion of the string pointed to by str to long long integer representation.
It is equivalent to:
strtoll(str, (char **)NULL, 10);
While the atol() and atoll() functions use the current locale, the atol_l() and atoll_l() functions may be passed locales directly. See
xlocale(3) for more information.
ERRORS
The functions atol() and atoll() need not affect the value of errno on an error.
SEE ALSO
atof(3), atoi(3), strtod(3), strtol(3), strtoul(3), xlocale(3)
STANDARDS
The atol() function conforms to ISO/IEC 9899:1990 (``ISO C90''). The atoll() function conforms to ISO/IEC 9899:1999 (``ISO C99'').
BSD
November 28, 2001 BSD