05-23-2005
Conversion Problem
hi,
i am reading a string values from a file.the values are
2000
20000
300
10
5000
now retrieving each value one by one and printing if they are greater than 1000.
i use this statement for the same (in perl script)
if ($_ gt 1000){
print $_
}
but its now prininting all the values.
are the strings form files trated as characters?if so how can convert them to number?any type cast operator?or am i doin anything else wrong?
Thnaks and Regards
Vivek.S
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I am putting the file on UNIX server using "put" remote command. i have one character i.e. Pipeline(|) in the file. When i send this file from other system(Mainframe) to UNIX server, i found that the chracter get changed to Exlametory mark(!). I don't know why?.
Can any way tell me... (2 Replies)
Discussion started by: Balkrishna
2 Replies
2. Shell Programming and Scripting
hi all
i have a file like
151125
25252
2452567
253464576
255
i want this file to be like
'151125','25252','2452567','253464576','255'
please help
thanks (3 Replies)
Discussion started by: infyanurag
3 Replies
3. UNIX for Dummies Questions & Answers
Hi,
My input file contains the record(s) as below with space as FS.
01-01024180 35000 MV010 02/03/09 0306 03060226 03
02-00410330 470000 MV010 02/03/09 0301 03010276 03
1. I need to convert the field 02/03/09 (dd/mm/yy) to yyyymmdd yet retain the Field separator.
Using the modified... (2 Replies)
Discussion started by: talk2pawee
2 Replies
4. Shell Programming and Scripting
How to convert Nov 10 14:20 to YYYYMMDDHHMMSS in unix
I am using K-shell HP-AUX (1 Reply)
Discussion started by: chinniforu2003
1 Replies
5. Shell Programming and Scripting
Hi,
I have a requirement to capture file time stamp and compare with current system time. I am using HP-AUX K-shell.
Below is what i have done
Getting current date into myfile2
---------------------------------
date +%Y%m%d%H%M%S > myfile2
20091110132800
Getting the file date into... (5 Replies)
Discussion started by: chinniforu2003
5 Replies
6. Programming
Hi all.
I have the following code:
#include<stdio.h>
#include<time.h>
int main()
{
struct tm tm;
time_t time = 1262322000; /*Jan, 01, 2010*/
char temp;
int i = 0;
while(i < 4)
{
memset(temp, 0, 128);
localtime_r(&time,... (2 Replies)
Discussion started by: adm1n
2 Replies
7. Shell Programming and Scripting
Hi,
typeset -l sgf # all lowercase letters
typeset -u SGF # all uppercase letters
sgf=$1
SGF=$sgf
these lines used in my scripts . It ran fine in ksh but when we convert this to bash it erroring out.
I like to know what the use of typeset ??
Thanks & Regards
kanagaraj (3 Replies)
Discussion started by: kanagaraj
3 Replies
8. UNIX for Advanced & Expert Users
Hi all,
I have one libxxx.so file ( which I got from a third party ). We use shared library libxxx.sl . Is there any way to convert the .so file to .sl file ?
Thanks in advance
- M (3 Replies)
Discussion started by: kanu_kanu
3 Replies
9. Shell Programming and Scripting
Hi Friends,
I am not able to conver character set from UTF-8 to IBM-284 throwing an error "cannot open convertor" . Could you please help me how to get out of this error.
Below command is working fine
iconv -f ISO8859-15 -t UTF-8 fromfile.txt > tofile.txt
But the below command is... (2 Replies)
Discussion started by: sivakumarl
2 Replies
10. Shell Programming and Scripting
To convert file epcdic to ascill format,i am using below code.Getting some junk characters in output file.not sure what the issue is.Please correct if below command is wrong.
DD conv=ascii if=filename of =output_filename. (2 Replies)
Discussion started by: srivalli
2 Replies
LEARN ABOUT DEBIAN
sctp_test
sctp_test(1) General Commands Manual sctp_test(1)
NAME
sctp_test - Send and receive messages via SCTP
SYNOPSIS
sctp_test -H -P -h -p -l|s
DESCRIPTION
This is a userspace test application for the SCTP Linux kernel reference implementation.
OPTIONS
-H local-addr
-P local-port
-h remote-addr
-p remote-port
-s Act as client
-l Listen for connections (server)
-a assoc_pattern
assoc_pattern in the mixed mode 0 = sequential ascending(default) 1 = random
-d debug
0 = none 1 = min(default) 2 = max
-c testcase
0 = 1 byte packets. 1 = 1352 byte packets.
(fragmentation point for an i/f with 1500 as mtu.) 2 = 1353 byte packets.
(min. size at which fragmentation occurs
for an i/f with 1500 as mtu.) 3 = Sequence of 1, 1353, 32768 byte packets. 4 = Sequence of following size packets.
(1, 1000, 2000, 3000, 5000, 10000,15000, 20000, 25000, 32768) 5 = 32768 byte packets.
(default max receive window size.) 6 = random size packets.
-ve value
Packets of specifed size.
-m msgsize
(1500-65515, default value 32768)
-x number_of_repeats
-o order_pattern
0 = all unordered(default) 1 = all ordered 2 = alternating 3 = random -t stream_pattern
0 = sequential ascending(default)
1 = random -M max_stream (default value 0) -r seed (default 0, use time()) -L num_ports (default value 0). Run the mixed mode -S
num_ports (default value 0). Run the mixed mode -D Drain. If in client mode do a read following send.
USAGE
server: sctp_test -H local_addr -P local_port -l
client: sctp_test -H local_addr -P local_port -h remote_addr
-p remote-port -s
AUTHOR
Michael Biebl <biebl@debian.org>
sctp_test(1)