Sponsored Content
Top Forums Shell Programming and Scripting Problem in ksh script ( String comparison ) Post 302079888 by arunkumar_mca on Thursday 13th of July 2006 12:14:41 PM
Old 07-13-2006
Hi amarnath,

No there is no limitation to length.Are you gettingg because of space issue????

Thanks,
Arun
 

10 More Discussions You Might Find Interesting

1. AIX

Problem in ksh script ( String comparison )

hi , i am trying to compre two strings if ] or if ] when the length of var1 is small (around 300-400 char ) it works fine but when it is large (around 900-1000 chars) it fails is there any limitations for this type of comparison ??? (1 Reply)
Discussion started by: amarnath
1 Replies

2. Shell Programming and Scripting

problem in string comparison in shell programming

Hello, was just wondering how to compare strings in unix? I mean as in C there is a function strcmp() in string.h, is there any function in unix for that? I tried using if and all such variations but didn't succeed. Any help would be appreciated. Thanks in advance :) (9 Replies)
Discussion started by: salman4u
9 Replies

3. Shell Programming and Scripting

bash shell script string comparison

I want to remove a line that has empty string at second field when I use cut with delimeter , like below $cat demo hello, mum hello, #!/bin/sh while read line do if then # remove the current line command goes here fi done < "demo" i got an error message for above... (4 Replies)
Discussion started by: bonosungho
4 Replies

4. Shell Programming and Scripting

Date comparison using ksh

Hi All, i have a text sample below. rootdbs 1 0 01/03/2010.03:11 physdbs 2 0 01/03/2010.03:17 logdbs01 3 0 01/03/2010.03:17 logdbs02 4 0 01/03/2010.03:17 dbs01 5 0 01/03/2010.03:17 dbs02 6 0 01/03/2010.03:17 dbs03 7 0 01/03/2010.03:17 dbs04 ... (4 Replies)
Discussion started by: informix2009
4 Replies

5. Solaris

String Comparison in Shell script

I Have a script which gets the status of oracle database and if the status is READ WRITE ..it should echo "db is up " else "db is down" Here is the code if then echo "db up" else echo "db down" fi done; The script is giving me out put "db down" even thoug the value of... (6 Replies)
Discussion started by: njafri
6 Replies

6. Shell Programming and Scripting

String comparison problem

Hi, can someone please help me!!! urgent! I have a strange issue here. I grep for 2 strings from a txt files and compare the string value. Though the string values are the same, they are compared as different values. Please help Case-1 -------- Here I grep for 2 different field values... (3 Replies)
Discussion started by: vani123
3 Replies

7. Shell Programming and Scripting

integer comparison in ksh

Hi, I am just trying to compare integer in ksh. can you please tell me what's wrong with this code... or give me suggestions on alternative. sample code: i=0; if ; then echo inside if fi Thanks in advance! (6 Replies)
Discussion started by: nram_krishna@ya
6 Replies

8. Shell Programming and Scripting

to extract string from main string and string comparison

continuing from my previous post, whose link is given below as a reference https://www.unix.com/shell-programming-scripting/171076-shell-scripting.html#post302573569 consider there is create table commands in a file for eg: CREATE TABLE `Blahblahblah` ( `id` int(11) NOT NULL... (2 Replies)
Discussion started by: vivek d r
2 Replies

9. Shell Programming and Scripting

Problem in string comparison

guys , i am using inotify for monitoring one directory to check core file generation , my snippet of code is follows #!/bin/bash DIR=$1 inotifywait -q -e create -m $DIR | while read path events name; do if ]; then echo "Now I am going to do something with $name in directory $path."... (5 Replies)
Discussion started by: baker
5 Replies

10. Shell Programming and Scripting

awk string comparison unterminated quoted string andrule of thumb

I have the logic below to look up for matches within the columns between the two files with awk. In the if statement is where the string comparison is attempted with == The issue seems to be with the operands, as 1. when " '${SECTOR}' " -- double quote followed by single quote -- awk matches... (1 Reply)
Discussion started by: deadyetagain
1 Replies
SIZE(1) 						    BSD General Commands Manual 						   SIZE(1)

NAME
size -- display section sizes and total size of ELF objects SYNOPSIS
size [--format=format] [--help] [--radix=radix] [--totals] [--version] [-ABVdhotx] [file ...] DESCRIPTION
The size utility lists the sizes of ELF sections, and optionally the total size, for each input file specified on the command line. The size utility can operate on ELF objects, on ar(1) archives containing ELF objects, and on core dumps. If no file name is specified on the com- mand-line, a.out is assumed. The size utility recognized the following options: --format=format Display output using the format specified by argument format. Supported values for this argument are: 'berkeley' and 'sysv'. The default output format is 'berkeley'. See Display Formats below for more information. --help Display a help message and exit. --radix=radix Display numeric values using the radix specified by argument radix. Supported values for radix are 8, 10 and 16. The default radix is 10. --totals Shows cumulative totals of section sizes from all objects. This option is ignored for System V style output. --version Display a version identifier and exit. -A Equivalent to specifying option --format=sysv. -B Equivalent to specifying option --format=berkeley. -V Equivalent to specifying option --version. -d Equivalent to specifying option --radix=10. -h Equivalent to specifying option --help. -o Equivalent to specifying option --radix=8. -t Equivalent to specifying option --totals. -x Equivalent to specifying option --radix=16. DISPLAY FORMATS
Berkeley Style Output If 'berkeley' style output is in effect, an initial header line naming fields will be output, followed by one line of output for each ELF object specified on the command line or found in an archive. Each line will contain the following whitespace separated fields in order: 1. The size of the text segment in the object. 2. The size of the data segment in the object. 3. The size of the 'bss' segment in the object. 4. The total size of the object in either decimal or octal. Decimal output is used if the specified output radix for numeric values is 10 or 16. Octal output is used if the radix being used for numeric values is 8. 5. The total size of the object in hexadecimal. 6. The file name of the object. If option --totals was specified, an additional line in the same format as above will be output at the end containing the sum of the respec- tive fields. The file name field for the line will contain the string '(TOTALS)'. System V Style Output If System V style output is selected, size will output the following information for each object: 1. The name of the object followed by a colon. 2. A header line containing the names of fields of subsequent lines. 3. One line per section present in the object. Each line has three fields: 1. The name of the section. 2. Its size, in the selected radix for numeric values. 3. The address associated with the section, in the selected numeric radix. 4. A line whose section name field contains the string 'Total' and whose size field contains the sum of all reported section sizes. EXIT STATUS
The size utility exits 0 on success, and >0 if an error occurs. EXAMPLES
To display the section sizes for /bin/ls use: $ size /bin/ls text data bss dec hex filename 20975 540 392 21907 5593 /bin/ls To display sizes and total for /bin/ls and /bin/dd in hexadecimal, use: $ size -tx /bin/ls /bin/dd text data bss dec hex filename 0x51ef 0x21c 0x188 21907 5593 /bin/ls 0x3df5 0x170 0x200 16741 4165 /bin/dd 0x8fe4 0x38c 0x388 38648 96f8 (TOTALS) To display section sizes for /bin/ls in System V format use: $ size -A /bin/ls /bin/ls : section size addr .interp 21 4194704 .note.ABI-tag 24 4194728 .hash 624 4194752 .dynsym 2088 4195376 .dynstr 810 4197464 .rela.dyn 120 4198280 .rela.plt 1656 4198400 .init 19 4200056 .plt 1120 4200076 .text 15224 4201200 .fini 14 4216424 .rodata 1472 4216448 .data 80 5267456 .eh_frame 1624 5267536 .dynamic 384 5269160 .ctors 16 5269544 .dtors 16 5269560 .jcr 8 5269576 .got 576 5269584 .bss 528 5270176 .comment 686 0 Total 27110 SEE ALSO
ar(1), nm(1), objdump(1), readelf(1), strings(1), elf(3), gelf(3) AT&T Unix Systems Labs, System V Application Binary Interface, http://www.sco.com/developers/gabi/. HISTORY
The size utility first appeared in Version 6 AT&T UNIX. AUTHORS
The size utility was re-written by S. Sam Arun Raj <samarunraj@gmail.com> This manual page was written by S. Sam Arun Raj <samarunraj@gmail.com> BSD
August 25, 2011 BSD
All times are GMT -4. The time now is 04:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy