10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Trying to use sed to, in-place, remove specific text from a file. Since there are / in the text I use | to escape that character. Thank you :).
sed -i -e 's|xxxx://www.xxx.com/xx/xx/xxx/.*/|' /home/cmccabe/list
sed: -e expression #1, char 51: unterminated `s' command (4 Replies)
Discussion started by: cmccabe
4 Replies
2. Shell Programming and Scripting
Hi,
I have below command in one of the script. Can you please let me know what does the curly braces do over here \{1,\}. The remaining part of the code atleast I am able to understand.
sed -n 's/.*\-\()\{1,\}\)\-.*/\1/p' (13 Replies)
Discussion started by: tostay2003
13 Replies
3. Shell Programming and Scripting
Hi Everyone,
in the below "xyz (Exception e)" part... after the curly braces, there is a new line and immediately few tabs are present before closing curly brace.
xyz (Exception e) {
}
note: there can be one or more newlines between the curly braces.
My desired output should be ... (6 Replies)
Discussion started by: NY_777
6 Replies
4. Shell Programming and Scripting
I'm trying to remove the first match only of 2Z694 from an xml file and replace with a blank
File Example:
</Phoenix_Response_Data>
<Bundle_Name_Primary>2Z694</Bundle_Name_Primary>
<Bundle_Name>2Z694</Bundle_Name>
</Phoenix_Response_Data>
tried using:
sed -e 's/'2Z694'/''/1' but this... (15 Replies)
Discussion started by: cillmor
15 Replies
5. UNIX for Advanced & Expert Users
I have a script that I am trying to apply on files that have form feeds between pages but I am trying to replace the last form feed, with carriage return so that when I convert it to a PDF file it won't generate a blank page.
My script looks like this
sed '$ s/\^L/\^M/' invoice.txt... (12 Replies)
Discussion started by: ziggy6
12 Replies
6. Shell Programming and Scripting
Hi
i need to remove all the lines staring with 'printf("\n' from a file,
example : the file tmp.txt contains
printf("\n ");
printf("\n good");
printf("\n ");
printf("\n ");
printf("");
printf(
m_sprintf(for
printf("\n ");
i have tried with following commands but... (5 Replies)
Discussion started by: mprakasheee
5 Replies
7. Shell Programming and Scripting
Hi everyone:
I'm stuck at this point, could you guys please give me some hints about what I am doing wrong in the following script, I'm using sed for windows:
sed ^"$ {^
a^
STRINGTABLE DISCARDABLE^
BEGIN^
#define CLIENT_MODULE, "%CLIENT_MODULE%"^
#define CLIENT_ID, "%CLIENT_ID%"^... (1 Reply)
Discussion started by: edgarvm
1 Replies
8. Shell Programming and Scripting
Hello and thx for reading this
I'm using sed to remove only the leading spaces in a file
bash-280R# cat foofile
some text
some text
some text
some text
some text
bash-280R#
bash-280R# sed 's/^ *//' foofile > foofile.use
bash-280R# cat foofile.use
some text
some text
some text... (6 Replies)
Discussion started by: laser
6 Replies
9. Shell Programming and Scripting
hi,
I want to print all the lines between the matching braces.
For example,the file contains like the below.
asdfsdf
fsdfsd
WO{
w1{
ada
... (3 Replies)
Discussion started by: Boopesh
3 Replies
10. Shell Programming and Scripting
i tried the following:-
sed -e file 's/^@//g' > temp
also tried
sed -e file 's///g' > temp
nothing happened....can someone please tell me wht is wrong???
also someinformation abt the character "^@"(it is ONLY ONE character and NOT TWO characters)
thanx in advance.. (13 Replies)
Discussion started by: sayonm
13 Replies