Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to check a particular element in a string variable Post 302287098 by frank_rizzo on Thursday 12th of February 2009 07:27:06 PM
Old 02-12-2009
If your using bash check "${parameter:offset:length}" in the man page.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to check a string in the variable

hi, I have a variable var1 as follows in the script. var1="one two three desformat=PDF xyz" I would like to check whether $var1 has a string "desformat=PDF" or not. Is there any command I can use (not need to creat a file)? Currently, I am using this: if ( grep "desformat=PDF"... (1 Reply)
Discussion started by: josephwong
1 Replies

2. UNIX for Dummies Questions & Answers

check whether variable number or string

I am passing an argument to a file and i wanna check whether the argument is a number or string ? how can i do this? (4 Replies)
Discussion started by: rolex.mp
4 Replies

3. UNIX for Advanced & Expert Users

check if a variable contains a string

hi I have an if condition that states: if ; then exit how to translate this? $x is a path $y is a string that comes at the end of the path thx (11 Replies)
Discussion started by: melanie_pfefer
11 Replies

4. UNIX for Dummies Questions & Answers

Check the value of a string variable

hi to all, i want to check the value of a variable that it contains characters. for example i try the following: if then ......... i just want to check that in the specific line that is a variable called "passline" has the entry "password". But it can contain also other characters in the... (4 Replies)
Discussion started by: omonoiatis9
4 Replies

5. Windows & DOS: Issues & Discussions

Array element & string variable

Hello, I am trying to assign $string = $a; #a= 10100 print " $string"; # showing 10100 I am using this $string as $result = index($string, $char, $offset); As above, is not capturing binary nos. in following format; $string = '10100'; so index is not working. kindly suggest. (5 Replies)
Discussion started by: shristi
5 Replies

6. Shell Programming and Scripting

Help! Yet another check element in array Question

Greetings, DISCLAIMER: My shell scripting is rusty so my question may be borderline stupid. You've been warned. I need to create a script that a) lists the content of zip files in a directory and b) sends out an `exception` report. My ZIP files contain a control file (for load check). I want... (2 Replies)
Discussion started by: alan
2 Replies

7. Shell Programming and Scripting

korn shell: check the content of a string of a variable

hello, i have a variable which should have following content : var="value1" or var="value2" or var="value2:*" # example: value2:22 how can i check : - if the content is ok (value1 / value2* ) - the two options of "value2" when content is example "value2:22" , i want to split... (3 Replies)
Discussion started by: bora99
3 Replies

8. Shell Programming and Scripting

Perl: How to check whether my array contains element x

Hi All, I am new to perl I am stuck in simple problem I need your help I want to define a subroutine. sub check_if_entity_exists(@array_to_be_checked,$entityName) I have array as http-listener-1 http-listener-2 http-listener-3 http-listener-4 If i send http-listener-3 my... (1 Reply)
Discussion started by: javaholics
1 Replies

9. Shell Programming and Scripting

Awk: check element in array and it's value

Hello, I want to see if element exists in array, if so then, check it's corresponding value. Column 4 is position and column 1 is the chromosome for it. There are duplicates for one position on one chromosome. I want to check if same position exists on different chromosome: Data... (8 Replies)
Discussion started by: genome
8 Replies

10. UNIX for Beginners Questions & Answers

Check if string variable is a subset of another string variable

Below is my ksh shell script where I need to check if variable fileprops is a subset of $1 argument. echo "FILE PROPERTY: $fileprops" echo "PARAMETER3: $1" if ; then echo "We are Good. $line FILE is found to be INTACT !! " else echo... (2 Replies)
Discussion started by: mohtashims
2 Replies
creat64(2)							System Calls Manual							creat64(2)

NAME
creat64(), fstat64(), fstatvfs64(), getrlimit64(), lockf64(), lseek64(), lstat64(), mmap64(), open64(), pread64(), prealloc64(), pwrite64(), setrlimit64(), stat64(), statvfs64(), truncate64(), ftruncate64(), O_LARGEFILE - non-POSIX standard API interfaces to support large files SYNOPSIS
DESCRIPTION
New API's to support large files in 32-bit applications. These API interfaces are not a part of the POSIX standard and may be removed in the future. The function returns a file descriptor which can be used to grow the file past 2 GB if desired. All other functional behaviors, returns, and errors are identical to The function is identical to except that returns file status in a instead of a All other functional behaviors, returns, and errors are identical. The function is indentical to except that returns file status in a struct instead of a struct The function is identical to except that passes a as its second parameter instead of a All other functional behaviors, returns, and errors are identical. The function is identical to except that accepts an for the size parameter instead of All other functional behaviors, returns, and errors are identical. The function is identical to except that accepts an type as the desired offset and has a return value of All other functional behaviors, returns, and errors are identical. The function is identical to except that returns file status in a instead of All other functional behaviors, returns, and errors are identical. The function is identical to except that accepts the file offset as an The function opens files of any size. It returns a file descriptor which can be used to grow the file past 2 GB if desired. All other functional behaviors, returns, and errors are identical to The function is identical to except that accepts the file offset as an All other functional behaviors, returns, and errors are identical to The function is identical to except that accepts the file offset as an All other functional behaviors, returns, and errors are identical to The function is identical to except that accepts the file offset as an All other functional behaviors, returns, and errors are identical to The function is identical to except that passes a as its second parameter instead of a All other functional behaviors, returns, and errors are identical. The function is identical to except that returns file status in a instead of a Refer to The function is identical to except that accepts the length parameter as an instead of All other functional behaviors, returns, and errors are identical to The function is identical to except that accepts the length parameter as an instead of All other functional behaviors, returns, and errors are identical to Setting in a call to or is equivalent to calling or both of which set in the file status flags. This bit is automatically set by and if is set to 64. The bit may be queried by (or which can also turn the bit on or off if desired. APPLICATION USAGE
The standard POSIX interfaces may be used by 32-bit applications to create and access large files if compiled with set to 64. The interfaces described here are alternatives to the standard ones, and are enabled by defining For 64-bit applications, access to large files is automatic, as long as the underlying file system is enabled for large files. The inter- faces on this man page are available to 64-bit applications, for convenience in porting, but provide no additional capabilities. The exception is which is not visible to 64-bit applications. SEE ALSO
creat(2), thread_safety(5). creat64(2)
All times are GMT -4. The time now is 06:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy