Sponsored Content
Top Forums Shell Programming and Scripting Find string in file and append new string after Post 302859393 by Jotne on Thursday 3rd of October 2013 04:02:28 AM
Old 10-03-2013
This add text behind parent::__construct();, not on a new line below as requested.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Search a string and append text after the string

Hi, I have a file like this... <o t="Batch" id="8410" p="/" g="32"> <a n="name"> <v s="DBBA1MM"/> </a> <a n="owner"> <v r="/Administrator"/> </a> <a n="rights"> <v s="95"/> </a> <a n="debugLevel"> <v s="3"/> </a> <a n="avsStoreLoc"> <v... (8 Replies)
Discussion started by: kesu2k
8 Replies

2. UNIX for Dummies Questions & Answers

How can i append a file name with a string

Hi All How can i append a file name with a string e.g. Lets say i have a file called ABC_TEST_1234_1.dat and i want to append the file name with a lets say 100 so the output file should look like ABC_100_TEST_1234_1.dat i have aroung 9000 file in a directory and want to... (3 Replies)
Discussion started by: Nikhilindurkar
3 Replies

3. Shell Programming and Scripting

sed to find first appearance and append string

I have a file like below #GROUP A belongs to Asia GROUP A jojh hans local admin GROUP A gege fans michel jing jong #GROUP U belongs to USA GROUP U jeff goal hello world My requirement is to grep for first apperence of GROUP A which is not commented and append my name to end of file.... (12 Replies)
Discussion started by: vkk
12 Replies

4. Linux

Find String in FileName and move the String to new File if not found

Hi all, I have a question.. Here is my requirement..I have 500 files in a path say /a/b/c I have some numbers in a file which are comma seperated...and I wanted to check if the numbers are present in the FileName in the path /a/b/c..if the number is there in the file that is fine..but if... (1 Reply)
Discussion started by: us_pokiri
1 Replies

5. UNIX for Dummies Questions & Answers

Append a string on the next line after a pattern string is found

Right now, my code is: s/Secondary Ins./Secondary Ins.\ 1/g It's adding a 1 as soon as it finds Secondary Ins. Primary Ins.: MEDICARE B DMERC Secondary Ins. 1: CONTINENTAL LIFE INS What I really want to achieve is having a 1 added on the next line that contain "Secondary Ins." It... (4 Replies)
Discussion started by: newbeee
4 Replies

6. Shell Programming and Scripting

find string and replace with string in other file

Dear all, I need your help, I have file like this: file1:23456 01910964830098775635 34567 01942809546554654323 67589 26546854368698023653 09778 58716868568576876878 08675 86178546154065406546 08573 54165843543054354305 . .file2: 23456 25 34567 26 67589 27 (2 Replies)
Discussion started by: attila
2 Replies

7. Shell Programming and Scripting

Find string in a file and append character

Hi Experts, Is there a way to find a string in a file then append a character to that string then save the file or save to another file. Here is an example. >cat test.txt NULL NULL NULL 9,800.00 NULL 1,234,567.01 I want to find all NON NULL String and add a dollar sign to those... (9 Replies)
Discussion started by: brichigo
9 Replies

8. Shell Programming and Scripting

Append a searched string with another string using sed

Hi, I need to replace and append a string in a text if grep is true. For eg: grep ABC test.txt | grep -v '\.$' | awk {'print $4'} | sed "s/ ? How do I replace all instances of "print $4" using sed with another sring? Eg of the string returned will be, lx123 web222 xyz Want to... (8 Replies)
Discussion started by: vchee
8 Replies

9. Shell Programming and Scripting

sed - Find a String and append a text end of the Line

Hi, I have a File, which have multiple rows. Like below 123456 Test1 FNAME JRW#$% PB MO Approver XXXXXX. YYYY 123457 Test2 FNAME JRW#$% PB MO Super XXXXXX. YYYY 123458 Test3 FNAME JRW#$% PB MO Approver XXXXXX. YYYY I want to search a line which contains PB MO Approver and append... (2 Replies)
Discussion started by: java2006
2 Replies

10. Shell Programming and Scripting

Find string in file and find the all records by string

Hello I would like to get know how to do this: I got a big file (about 1GB) and I need to find a string (for instance by grep ) and then find all records in this file based on a string. Thanks for advice. Martin (12 Replies)
Discussion started by: mape
12 Replies
CURL_ESCAPE(3)								 1							    CURL_ESCAPE(3)

curl_escape - URL encodes the given string

SYNOPSIS
string curl_escape (resource $ch, string $str) DESCRIPTION
This function URL encodes the given string according to RFC 3986. PARAMETERS
o $ch -A cURL handle returned by curl_init(3). o $str - The string to be encoded. RETURN VALUES
Returns escaped string or FALSE on failure. EXAMPLES
Example #1 curl_escape(3) example <?php // Create a curl handle $ch = curl_init(); // Escape a string used as a GET parameter $location = curl_escape($ch, 'Hofbrauhaus / Munchen'); // Result: Hofbr%C3%A4uhaus%20%2F%20M%C3%BCnchen // Compose an URL with the escaped string $url = "http://example.com/add_location.php?location={$location}"; // Result: http://example.com/add_location.php?location=Hofbr%C3%A4uhaus%20%2F%20M%C3%BCnchen // Send HTTP request and close the handle curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_exec($ch); curl_close($ch); ?> SEE ALSO
curl_unescape(3), urlencode(3), rawurlencode(3), RFC 3986. PHP Documentation Group CURL_ESCAPE(3)
All times are GMT -4. The time now is 04:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy