10-06-2009
Do you mean replace the pattern with the file contents? Add the contents after the line with the pattern? Replace the line with file contents? It isn't clear what you mean.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. UNIX for Advanced & Expert Users
Hi,
I would appriciate if somebody can help me figure out how to search for all the *.xml file under a specific directory and subdirectroies (/home/username) and later search of content "<start>" inside the xml file returned by search.
-Lovin.V (2 Replies)
Discussion started by: lovi_v
2 Replies
3. Shell Programming and Scripting
I am not sure if this is doable. I am trying to open and print the content of the file by replacing all instances fo perl to PERL . This is my code but it is
giving me the number count instead of the actual lines with changes.
open (PERLHISTORY, 'sample.txt') or die "The file sample.txt could... (3 Replies)
Discussion started by: jxh461
3 Replies
4. Shell Programming and Scripting
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
5. UNIX for Advanced & Expert Users
Hi,
I need help. I have XML file as below
<a n="infoLevel">
<v s="true"/>
</a>
<a n="localAddr">
<v s="server.host.com"/>
</a>
<a n="ListenPort">
<v s="21111"/>
</a>
I need to find variable "ListenPort" in line and then replace... (4 Replies)
Discussion started by: rdtrivedi
4 Replies
6. Shell Programming and Scripting
Hi,
I am having trouble while using 'sed' with reading files. Please help. I have 3 files. File A, file B and file C. I want to find content of file B in file A and replace it by content in file C.
Thanks a lot!!
Here is a sample of my question.
e.g. (file A: a.txt; file B: b.txt; file... (3 Replies)
Discussion started by: dirkaulo
3 Replies
7. Shell Programming and Scripting
Hi,
I have two files master.txt & reference.txt. Sample below
Master.txt
2372,MTS,AP
919848001104,Airtel,DL
0819,MTS,MUM
919849788001,Airtel,AP
1430,Aircel MP,20
Reference.txt
2372,919848701430,46467
919848002372,2372,47195
2372,919849788001,59027
0819,028803,1
0819,029801,1... (2 Replies)
Discussion started by: siramitsharma
2 Replies
8. Shell Programming and Scripting
Hi,I have 2 files master.txt & reference.txt as shown below & i require o/p as mentioned in file 3 using awk but content is not replacing properlymaster.txt:... (15 Replies)
Discussion started by: siramitsharma
15 Replies
9. Shell Programming and Scripting
Hi,
Below is my input file :
AAAG(12) TC(14)
AACCCT(66) AACCCT(30) AACCCT(18) AACCCT(48)
TCTG(12) TCTG(20) TCTG(16) AC(12) AC(12) TCTG(16) TCTG(12) AC(12) AC(12) AC(12)
AC(26) AC(14)
AGTG(12) AC(24)
AGTG(12) TCC(12)
Desired output :
AAAG TC
AACCCT AACCCT AACCCT AACCCT
TCTG TCTG... (4 Replies)
Discussion started by: perl_beginner
4 Replies
10. Shell Programming and Scripting
Hi Team,
I am new to unix, please help me in this.
I have a file named properties.
The content of the file is :
##Mobile props
east.url=https://qa.east.corp.com/prop/end
west.url=https://qa.west.corp.com/prop/end
south.url=https://qa.south.corp.com/prop/end... (2 Replies)
Discussion started by: tolearn
2 Replies
LEARN ABOUT DEBIAN
gpe-question
GPE-QUESTION(1) gpe-question GPE-QUESTION(1)
NAME
gpe-question - GPE interface for asking questions from shell scripts.
SYNOPSIS
gpe-question [---icon] name {--question "Question text"} {--buttons icon1:text1} [icon2:text2 ...]
DESCRIPTION
This manual page was written for the Debian(TM) distribution because the original program does not have a manual page.
gpe-question provides dialogues to raise a question within the GPE Palmtop Environment with cancel and ok buttons.
OPTIONS
--question STRING
The question to ask the user via the dialogue.
--buttons type:label
The type and label of the button(s) to be shown. Repeat for additional buttons.
EXAMPLES
gpe-question "test" --question "Do you want to check first?" --buttons YES:yes NO:no
AUTHOR
This manual page was written by Neil Williams <codehelp@debian.org> for the Debian(TM) system (but may be used by others). Permission is
granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version
published by the Free Software Foundation.
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
AUTHOR
Moray Allen
Author.
COPYRIGHT
Copyright (C) 2007 Neil Williams
Debian 1 January 16, 2007 GPE-QUESTION(1)