Sponsored Content
Top Forums Shell Programming and Scripting finding the Last String in a Line Post 302516169 by Rohit1234 on Thursday 21st of April 2011 10:02:14 PM
Old 04-21-2011
finding the Last String in a Line

Hi,

i am looking for a command that can help me find the last Sting in a Line

ex.. [Thr 138] yyeyrtehhehrerry: change this from [Starting steps (10)] to [END (3)]

here i want to extract END.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Finding a certain string on each line in a file

Hi, I need a script to get every line from a file where there are less then 17 ; on a line. Thank's (5 Replies)
Discussion started by: VODAFUN
5 Replies

2. Shell Programming and Scripting

help with finding a string

Hello folks I have a text file abcd.txt and has a line starting with number '8'. I have a string in this line starting at position 'a' to position 'b' also this string is a number and have to be reduced by 1. there is also a problem that it has to be padded with zeros to make the string... (2 Replies)
Discussion started by: sandyg
2 Replies

3. Shell Programming and Scripting

Finding a string in a text file and posting part of the line

What would be the most succinct way of doing this (preferably in 1 line, maybe 2): searching the first 10 characters of every line in a text file for a specific string, and if it was found, print out characters 11-20 of the line on which the string was found. In this case, it's known that there... (13 Replies)
Discussion started by: busdude
13 Replies

4. Shell Programming and Scripting

Finding a string with another string is found

finding a string with another string is found EX: abs c/- i want to find /-, then copy abs. i know it's easy use awk, but my problem is the substr syntax. substr($2,2,2) will give me /- but the conflict is /- is not always the second characted of the second string. (11 Replies)
Discussion started by: engr.jay
11 Replies

5. Solaris

Line too long error Replace string with new line line character

I get a file which has all its content in a single row. The file contains xml data containing 3000 records, but all in a single row, making it difficult for Unix to Process the file. I decided to insert a new line character at all occurrences of a particular string in this file (say replacing... (4 Replies)
Discussion started by: ducati
4 Replies

6. Shell Programming and Scripting

finding the line number of a particular line in a file

Hi Frnds, I need to find the line number of a particular line in a file and store that line number to a variable. if a file named myfile contains following look at the sun look at the moon look at the star look at the ocean i need to get the line number of the line 'look at the... (3 Replies)
Discussion started by: mvignesh
3 Replies

7. Shell Programming and Scripting

Reformatting single column text file starting new line when finding particular string

Hi, I have a single colum file and I need to reformat the file so that it creates a new line every time it come to an IP address and the following lines are corresponding rows until it comes to the next IP address. I want to turn this 172.xx.xx.xx gwpusprdrp02_pv seinwnprd03... (7 Replies)
Discussion started by: kieranfoley
7 Replies

8. Shell Programming and Scripting

Help with finding last line of file: if statement depending on that line.

Good morning, My first time actually posting in this forum, though I have used this forum to help with numerous projects. I am trying to figure out why my if statement does not work. I have a file where a line is inputted every 15 seconds. I want this if statement to check what the last line... (3 Replies)
Discussion started by: Shanrunt
3 Replies

9. Red Hat

How to add a new string at the end of line by searching a string on the same line?

Hi, I have a file which is an extract of jil codes of all autosys jobs in our server. Sample jil code: ************************** permission:gx,wx date_conditions:yes days_of_week:all start_times:"05:00" condition: notrunning(appDev#box#ProductLoad)... (1 Reply)
Discussion started by: raghavendra
1 Replies
OCI_BIND_ARRAY_BY_NAME(3)												 OCI_BIND_ARRAY_BY_NAME(3)

oci_bind_array_by_name - Binds a PHP array to an Oracle PL/SQL array parameter

SYNOPSIS
bool oci_bind_array_by_name (resource $statement, string $name, array &$var_array, int $max_table_length, [int $max_item_length = -1], [int $type = SQLT_AFC]) DESCRIPTION
Binds the PHP array $var_array to the Oracle placeholder $name, which points to an Oracle PL/SQL array. Whether it will be used for input or output will be determined at run-time. PARAMETERS
o $statement - A valid OCI statement identifier. o $name - The Oracle placeholder. o $var_array - An array. o $max_table_length - Sets the maximum length both for incoming and result arrays. o $max_item_length - Sets maximum length for array items. If not specified or equals to -1, oci_bind_array_by_name(3) will find the longest element in the incoming array and will use it as the maximum length. o $type - Should be used to set the type of PL/SQL array items. See list of available types below: o SQLT_NUM - for arrays of NUMBER. o SQLT_INT - for arrays of INTEGER (Note: INTEGER it is actually a synonym for NUMBER(38), but SQLT_NUM type won't work in this case even though they are synonyms). o SQLT_FLT - for arrays of FLOAT. o SQLT_AFC - for arrays of CHAR. o SQLT_CHR - for arrays of VARCHAR2. o SQLT_VCS - for arrays of VARCHAR. o SQLT_AVC - for arrays of CHARZ. o SQLT_STR - for arrays of STRING. o SQLT_LVC - for arrays of LONG VARCHAR. o SQLT_ODT - for arrays of DATE. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 oci_bind_array_by_name(3) example <?php $conn = oci_connect("hr", "hrpwd", "localhost/XE"); if (!$conn) { $m = oci_error(); trigger_error(htmlentities($m['message']), E_USER_ERROR); } $create = "CREATE TABLE bind_example(name VARCHAR(20))"; $stid = oci_parse($conn, $create); oci_execute($stid); $create_pkg = " CREATE OR REPLACE PACKAGE ARRAYBINDPKG1 AS TYPE ARRTYPE IS TABLE OF VARCHAR(20) INDEX BY BINARY_INTEGER; PROCEDURE iobind(c1 IN OUT ARRTYPE); END ARRAYBINDPKG1;"; $stid = oci_parse($conn, $create_pkg); oci_execute($stid); $create_pkg_body = " CREATE OR REPLACE PACKAGE BODY ARRAYBINDPKG1 AS CURSOR CUR IS SELECT name FROM bind_example; PROCEDURE iobind(c1 IN OUT ARRTYPE) IS BEGIN -- Bulk Insert FORALL i IN INDICES OF c1 INSERT INTO bind_example VALUES (c1(i)); -- Fetch and reverse IF NOT CUR%ISOPEN THEN OPEN CUR; END IF; FOR i IN REVERSE 1..5 LOOP FETCH CUR INTO c1(i); IF CUR%NOTFOUND THEN CLOSE CUR; EXIT; END IF; END LOOP; END iobind; END ARRAYBINDPKG1;"; $stid = oci_parse($conn, $create_pkg_body); oci_execute($stid); $stid = oci_parse($conn, "BEGIN arraybindpkg1.iobind(:c1); END;"); $array = array("one", "two", "three", "four", "five"); oci_bind_array_by_name($stid, ":c1", $array, 5, -1, SQLT_CHR); oci_execute($stid); var_dump($array); ?> PHP Documentation Group OCI_BIND_ARRAY_BY_NAME(3)
All times are GMT -4. The time now is 02:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy