Sponsored Content
Top Forums UNIX for Dummies Questions & Answers vi search & replace ... having '/' in string - problem. Post 302122432 by videsh77 on Wednesday 20th of June 2007 12:45:28 PM
Old 06-20-2007
I am still getting error message as -

'There are extra characters at the end of substitute command'.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

String Search & Replace

Hey, I want to have a C program which, for an existing file supplied by the command line argument (E.g. File1.txt) replaces all the occurrences of the words: "We” or “we” by “I” “a” by “the” “A” by “The”. Then print the replaced file. All other characters of the file are to be left... (1 Reply)
Discussion started by: IwishIknewC
1 Replies

2. Shell Programming and Scripting

how to insert line break + string in vi (search & replace )

Hello all i have big test file that has allot of structure text something like this : <foo1 *.html> <blah action> somthing 1 somthing 2 </blah> </foo1 > now i will like to insert 2 more lines of text below the <blah action> so it will be like : <foo1... (1 Reply)
Discussion started by: umen
1 Replies

3. Shell Programming and Scripting

Perl: Search for string on line then search and replace text

Hi All, I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text. An example of 4 lines in my file is: 1. MatchText_randomNumberOfText moreData ReplaceMe moreData 2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Discussion started by: Crypto
4 Replies

4. UNIX for Dummies Questions & Answers

Search & Replace

Hi , I ahve a text file which has several instances of the text such as run_time: 09:30 I need to add double quotes before and after the time value i.e: run_time: "09:30" Any suggestions on how to go about the same (4 Replies)
Discussion started by: jobbyjoseph
4 Replies

5. Shell Programming and Scripting

How do I search first&second string & copy all content between them to other file?

Hi All, How do I search first string & second string and copy all content between them from one file to another file? Please help me.. Thanks In Advance. Regards, Pankaj (12 Replies)
Discussion started by: pankajp
12 Replies

6. Shell Programming and Scripting

Search, replace string in file1 with string from (lookup table) file2?

Hello: I have another question. Please consider the following two sample, tab-delimited files: File_1: Abf1 YKL112w Abf1 YAL054c Abf1 YGL234w Ace2 YKL150w Ace2 YNL328c Cup9 YDR441c Cup9 YDR442w Cup9 YEL040w ... File 2: ... ABF1 YKL112W ACE2 YLR131C (9 Replies)
Discussion started by: gstuart
9 Replies

7. Shell Programming and Scripting

awk - replace number of string length from search and replace for a serialized array

Hello, I really would appreciate some help with a bash script for some string manipulation on an SQL dump: I'd like to be able to rename "sites/WHATEVER/files" to "sites/SOMETHINGELSE/files" within the sql dump. This is quite easy with sed: sed -e... (1 Reply)
Discussion started by: otrotipo
1 Replies

8. Shell Programming and Scripting

Find & Replace string in multiple files & folders using perl

find . -type f -name "*.sql" -print|xargs perl -i -pe 's/pattern/replaced/g' this is simple logic to find and replace in multiple files & folders Hope this helps. Thanks Zaheer (0 Replies)
Discussion started by: Zaheer.mic
0 Replies

9. Shell Programming and Scripting

awk + gsub to search multiple input values & replace with located string + extra text

Hi all. I have the following command that is successfully searching for any one of the strings on all lines of a file and replacing it with the instructed value. cat inputFile | awk '{gsub(/aaa|bbb|ccc|ddd/,"1234")}1' > outputFile This does in fact replace any occurrence of aaa, bbb,... (2 Replies)
Discussion started by: dazhoop
2 Replies

10. Shell Programming and Scripting

Search & Replace

Hi Gurus, I have two files. I want to read sessoin_name from the file1 and replace $Param4 & $Param5 in file2 with connection_name in specified in file1. The file1 will have data in following format File 1 session_name,connection_name s_abcd,Listener_2 s_def,Listener_1 source file... (7 Replies)
Discussion started by: r_t_1601
7 Replies
read(n) 						       Tcl Built-In Commands							   read(n)

__________________________________________________________________________________________________________________________________________________

NAME
read - Read from a channel SYNOPSIS
read ?-nonewline? channelId read channelId numChars _________________________________________________________________ DESCRIPTION
In the first form, the read command reads all of the data from channelId up to the end of the file. If the -nonewline switch is specified then the last character of the file is discarded if it is a newline. In the second form, the extra argument specifies how many characters | to read. Exactly that many characters will be read and returned, unless there are fewer than numChars left in the file; in this case all | the remaining characters are returned. If the channel is configured to use a multi-byte encoding, then the number of characters read may | not be the same as the number of bytes read. | If channelId is in nonblocking mode, the command may not read as many characters as requested: once all available input has been read, the | command will return the data that is available rather than blocking for more input. If the channel is configured to use a multi-byte | encoding, then there may actually be some bytes remaining in the internal buffers that do not form a complete character. These bytes will | not be returned until a complete character is available or end-of-file is reached. The -nonewline switch is ignored if the command returns before reaching the end of the file. Read translates end-of-line sequences in the input into newline characters according to the -translation option for the channel. See the fconfigure manual entry for a discussion on ways in which fconfigure will alter input. SEE ALSO
file(n), eof(n), fblocked(n), fconfigure(n) KEYWORDS
blocking, channel, end of line, end of file, nonblocking, read, translation, encoding Tcl 8.1 read(n)
All times are GMT -4. The time now is 08:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy