Search Results

Search: Posts Made By: Bertieboy7
1,756
Posted By Bertieboy7
How to copy text with ed to new file ?
Alright, so in ed i do a subsititution:

ed file << 'HERE'
s/.*h2.*>\(.*\)<.*/\1/p
HERE
This gives me my desired line:

Errors found while checking this document as XHTML 1.0 Transitional!...
2,094
Posted By Bertieboy7
so i should replace write_cmd_process by...
so i should replace
write_cmd_process

by my commands i want to execute ?
2,094
Posted By Bertieboy7
How to execute standard output ?
Alright so i got this script genpipe:
echo "$*" |sh genscript file
vi file << 'HERE'
:%s/^/echo /g
:%s/ $//g
:%s/[0-9] /&\| xargs \.\/plus /g
:wq
HERE
cat file


Which generates output...
3,460
Posted By Bertieboy7
alright, so i've come already pretty far. So...
alright, so i've come already pretty far.

So far i've got this
#!/bin/sh
read text
ex $1 <<'HERE'
a
text
.
wq
'HERE'


The only thing that has to be done now is that the text given by...
3,460
Posted By Bertieboy7
nope, it says: text is not an editor commando ...
nope, it says: text is not an editor commando

btw now i got this:
#!/bin/sh
read text
ex $1 <<HERE
$text
HERE
3,460
Posted By Bertieboy7
[SH] Problem reading input in script
Alright, so the goal of my script is to read text from standard input and store it into a file using the ex-editor:

so far i've got this, but it doesn't work.

#!/bin/s
read text
ex $1 >>...
Showing results 1 to 6 of 6

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