Search Results

Search: Posts Made By: Jedimark
1,542
Posted By jaysunn
I believe it opens the file only once, I ran: ...
I believe it opens the file only once, I ran:

[root@WATCHKICK ~]# strace sed -e 's/WEND/W_END/' -e 's/CLOSE/C_LOSE/' f.txt > strace_out.txt 2>&1And then grepped for the filename which only...
1,542
Posted By jaysunn
Maybe something like this, I am sure a much more...
Maybe something like this, I am sure a much more elegant solution will appear.

[root@WATCHKICK ~]# cat f.txt
WEND
CLOSE
[root@WATCHKICK ~]# sed -e 's/WEND/W_END/' -e 's/CLOSE/C_LOSE/' f.txt ...
2,097
Posted By Don Cragun
You could try something like: sed -e...
You could try something like:
sed -e 's/\(A......\)</\1*</' -e 's/\(A.....\)</\1*</' fileor
sed -e 's/\(A.\{5,6\}\)</\1*</' file
both of which (with the following text in file):
XCONFIGA1234<X...
1,895
Posted By Akshay Hegde
OR $ awk '!f && $0 ~...
OR

$ awk '!f && $0 ~ "<"tag".*>"{f=gsub(/-/," ")}f' tag='mytag' file
1,895
Posted By Subbeh
sed '/<mytagone>/s/-/ /g' file
sed '/<mytagone>/s/-/ /g' file
1,895
Posted By RavinderSingh13
Hello, Following may help you in same. ...
Hello,

Following may help you in same.



awk 'NR==1 {gsub(/\-/," ")} 1' file_name



Output will be as follows.


<mytagone>hello 1 2 3 world</mytagone>
<mytagtwo>hello 1-2-3...
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 02:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy