> Will cooperation come back to rescue this planet, or will it be too
> late? I suppose if one omits human exceptionalism, Nature will triumph
> by default. But it's going to hurt like hell!
works on my 9front
--
9fans: 9fans
Permalink:
https://9fans.topic
In ed I have a cleanup script which I can apply to several files at once. The
script removes things like blank lines and spaces between words. To run it on a
file or multiple files, I type this command:
ed [name of file(s)] < cleanup-script
I converted all the regular expressions in the file into
try with ssam(1).
% ssam -f thatscriptofyours somefile
-rodri
On Wed, Jul 21, 2021, 11:17 AM wrote:
> In ed I have a cleanup script which I can apply to several files at once.
> The script removes things like blank lines and spaces between words. To run
> it on a file or multiple files, I typ
There are many things here that feel wrong or at least inelegant, starting
with the first character. Surely you mean a comma not a period. You are
also inconsistent: sometimes you use x to find the pattern and then change
it, sometimes you use a substitute. It's more efficient in both time and
keys
you probably want to use ssam (no wq required)
what isn't working? some suggestions:
,x/‘‘|’’/s//"/ and ,x/‘|’/s//"/ → ,x/[“‘’”]/c/"
.x s/\*//g → ,x/\*/d
,x/^ +/s/// → ,x/^ +/d
,x/ +$/s/// → ,x/ +$/d
,x/ +/s// / → ,x/ +/c/ /
take your time, learn the language, & enjoy
umbraticus
On Wed, Jul 21, 2021 at 12:18 PM wrote:
>
> In ed I have a cleanup script which I can apply to several files at once. The
> script removes things like blank lines and spaces between words. To run it on
> a file or multiple files, I type this command:
> ed [name of file(s)] < cleanup-script
> I c
Thank you all for your responses. I will carefully study the suggestions
provided. sam is new to me and I am trying hard to learn it. There are obvious
errors in the script I provided and I apologise for those. I could as Rob
suggested simply apply the ed script, but I am trying to learn sam's
also worth mentioning the ^ command if you're using 9front's sam.
put your sam commands in script like this:
#!/bin/rc
cat << STOP
x/ +/c/
x/\*/d
STOP
then you can run ^script and it will apply the commands.
Note that if you leave off the commas before the commands,
as I have above, you will ha
> bash: fg: %: no such job
The % is a prompt: ignore it.
I think your script boils down to something like:
,x/\*|^ +| +$/d
,x/ +//c/
,x/[‘‘’’“”‘’]/c/"
,x/\\p|\\b/c/\n\n\n
,x/\n\n+/c/\n
umbraticus
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/g
Awesome. Thank you. I can hardly believe you have managed to reduce all those
commands to just a few. I will test this and revert back.
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/T10b1d559ae7d981e-M093404c48ec88dcc971cf6aa
Delivery o
> On Jul 20, 2021, at 10:52 PM, Lucio De Re wrote:
>
> what would
> it take to serve 9P on Posix (in P9P, in other words) over the
> network? Fontsrv and gitsrv would be immediate beneficiaries.
Just run it like,
fontsrv -s 'tcp!192.168.9.2!1500'
and I've no idea what gitsrv is.
-
if i want to serve files from a linux, i sometimes run drawterm on the
linux, export stuff to an /srv and then access that from the other
side.
theoretically you can automate that also from the other side, make
some script for the /srv stuff, and run it from 9front via ssh via
drawterm:
ssh linux
On Wed, Jul 21, 2021 at 11:12 AM hiro <23h...@gmail.com> wrote:
> if i want to serve files from a linux, i sometimes run drawterm on the
> linux, export stuff to an /srv and then access that from the other
> side.
>
> theoretically you can automate that also from the other side, make
> some script
> On Jul 21, 2021, at 11:08 AM, Dan Cross wrote:
>
> ssh linuxpc drawterm -c srvdev.rc
>
> yes it's a lot of back and forth, but ssh only is needed for running
> the process, the data afterwards can use 9p directly.
>
> What's the difference between that and using something like u9fs?
auth?
-
On Wed, Jul 21, 2021 at 12:17 PM Xiao-Yong Jin wrote:
> > On Jul 21, 2021, at 11:08 AM, Dan Cross wrote:
> > > ssh linuxpc drawterm -c srvdev.rc
> > >
> > > yes it's a lot of back and forth, but ssh only is needed for running
> > > the process, the data afterwards can use 9p directly.
> >
> > Wh
> On Jul 21, 2021, at 11:42 AM, Dan Cross wrote:
>
> On Wed, Jul 21, 2021 at 12:17 PM Xiao-Yong Jin wrote:
> > On Jul 21, 2021, at 11:08 AM, Dan Cross wrote:
> > > ssh linuxpc drawterm -c srvdev.rc
> > >
> > > yes it's a lot of back and forth, but ssh only is needed for running
> > > the proces
On Wed, Jul 21, 2021 at 1:09 PM Xiao-Yong Jin wrote:
> > On Jul 21, 2021, at 11:42 AM, Dan Cross wrote:
> >
> > On Wed, Jul 21, 2021 at 12:17 PM Xiao-Yong Jin
> wrote:
> > > On Jul 21, 2021, at 11:08 AM, Dan Cross wrote:
> > > > ssh linuxpc drawterm -c srvdev.rc
> > > >
> > > > yes it's a lot
> On Jul 21, 2021, at 12:16 PM, Dan Cross wrote:
>
> Nothing prevents you from invoking u9fs over an SSH connection; one needn't
> run it from inetd, and I doubt anyone has in 20 years.
You are right. In that case, the only difference is just that,
citing hiro,
yes it's a lot of back
> This is using ssh to attach to the Linux machine to import it's filesystem
> into the plan9 namespace? Wouldn't authenticating from plan9 to Linux over
> SSH be independent of drawterm vs u9fs?
yes, if you only need files from the filesystem ssh might be
sufficient protection.
also, with additio
On Wed, Jul 21, 2021 at 1:32 PM Xiao-Yong Jin wrote:
> > On Jul 21, 2021, at 12:16 PM, Dan Cross wrote:
> >
> > Nothing prevents you from invoking u9fs over an SSH connection; one
> needn't run it from inetd, and I doubt anyone has in 20 years.
>
> You are right. In that case, the only differen
it's still equivalent, obviously you can start drawterm in the
background or in some persistent virtual terminal emulator.
and yes, both drawterm and ssh will use TCP below, the only difference
in the stack for the actual data would be that instead of SSH you
would have TLS for encryption.
On 7/2
if you don't already use drawterm anyway for other reasons, and you
only would like to set up ssh, and you already have a working 9p
server for linux (like u9fs), i don't think there's an immediate
benefit in switching to drawterm.
otoh if you already do use drawterm interactively for different
re
I have tested all these solutions and they work. I can now apply the script
(now significantly improved) from within sam and also from the command line
with ssam. I will keep these posts as examples. The only question that remains
is how to add comments to this script. If I use # it is ignored.
*not ignored
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/T10b1d559ae7d981e-Mb735bb03a18063dea7599571
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
# is, for better or for worse, an address in sam:
#n The empty string after character n; #0 is the beginning
of the file.
If you're talking about running the script with ^, it's just an
executable. You can put whatever you want in the shebang line; I tend
to use the fol
> #!/bin/sed '/^#/d'
apologies. quotes do not belong there.
#!/bin/sed /^#/d
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/T10b1d559ae7d981e-Mfff65af821d77519fd6c8034
Delivery options: https://9fans.topicbox.com/groups/9fans/subscript
i wrote a cpu like client/server for windows (called dos).
my code and test environment lived on a microsoft smb server. i ran cifs(1) to
get access to this from plan9 and sam.
dos(1) allowed me to start an rc(1) running on win32 in the same directory as
my current directory on plan9. it als
27 matches
Mail list logo