Then it might be the funny character. Also know that the sed is not updating the file, it's just printing to the screen, so if you're xpecting the file to be updated, it's not.
Is the input you showed actual input or "example" input?
If it's actual, then there you have various other options:
Then it might be the funny character. Also know that the sed is not updating the file, it's just printing to the screen, so if you're xpecting the file to be updated, it's not.
Is the input you showed actual input or "example" input?
If it's actual, then there you have various other options:
Hi Scott!
Thank you!
these both command are working fine, but i dont get successful with the sed-commands. However -
is my favorit, because its easy and smartish - and for the only bracket in the row the accurate remedy.
Thanks a lot.
IMPe
I've got a sed shell script I've been using for quite a while to do batch find/replace operations on .xml files containing various types of text entries. This is the script I use:
#!/bin/bash
while read text_old text_new; do
sed_script+="s/$text_old/$text_new/g;"
done < trans_old_to_new... (9 Replies)
1. The problem statement, all variables and given/known data:
I have to write a script using sed, which delete everything between curly brackets and the brackets themself. The brackets might be nested.
The input-file is:
aaa { bbb ccc { ddd eee } fff { ... (2 Replies)
I'm trying to convert this line:
to
\ with sed.
This is what I have so far:
sed -e 's/\]*\)\]/\\\\\/'
but this still gives me .
Any suggestions? (15 Replies)
Both of these fail. One has two form feeds, the second form leaves all the backslashes.
bold='\(code\|command\|var\|samp\|option\|strong\)'
sed -e "s;@${bold}{"'\(*\)};\fB\2\fP;g'
sed -e "s;@${bold}{"'\(*\)};\\fB\2\\fP;g'
Obviously, I'm trying to change texi markup into man page markup, but it... (3 Replies)
Hi All,
I'm a newbie here, i'm just wondering how can i include my sftp command, here is my code. see below.
test -f /home/1.txt && sed -i "s/$/&,pogi" /home/1.txt
my sftp command: how can i insert my sftp command in my code above?
sftp ${USER}@${HOST} <<-EOF
cd ${INPUT_DONE}
... (0 Replies)
Hi All,
I have a text file which looks like this:
computer programming
systems engineering
I want to get rid of these square brackets and also the text that is inside these brackets. So that my final text file looks like this:
computer programming
systems engineering
I am using... (3 Replies)
Hi,
I am trying to strip out leading and trailing brackets from a word.
for example,
I have a value, in a file. I want to strip out the leading and trailing brackets it and should get the value Running.
I am using the following statement but in vain.
grep "Workflow run status:" <... (4 Replies)
Hi
I tried to extract 19 characters (default) enclosed with in tag from a file using cut command. If the characters comprises of double space, the cut command gives the output with a single spacing.
file 1
<name>Kumar Rajasekaran</name>
cut -c7-26 "file1"
the out put i received is ... (48 Replies)
Hi,
I have a sql file that runs something like this
vi Test.sql
REVOKE EXECUTE ON DEMO_USER.SQC_SAMP FROM PUBLIC;
REVOKE EXECUTE ON DEMO_USER.SQC_SAMP FROM DEMO_READ;
REVOKE SELECT ON DEMO_USER.DEMO_NOMINEE_TEST FROM DEMO_READ;
REVOKE EXECUTE ON DEMO_USER.SQC_SAMP FROM... (3 Replies)
Can someone please tell me how to do this...
input file - /etc/group:
wheel:*:0:root,timber
daemon:*:1:
mysql:*:88:
...etc...
giants:*:1001:dalton,bandit
dalton:*:1002:
bandit:*:1003:
output file (my goal):
giants:*:1001:
dalton:*:1002:
bandit:*:1003:I've come up with this:
... (3 Replies)