Article View: news.software.readers
Article #257458Re: slrn and remote editor via ssh
From: Sandman
Date: Mon, 28 Apr 2014 06:12
Date: Mon, 28 Apr 2014 06:12
53 lines
2942 bytes
2942 bytes
In article <slrnllrrmk.1e5e.g.kreme@amelia.local>, Lewis wrote:
> > > > > Lewis:
> > > > > bbedit -w --resume +%d
> > > >
> > > > Sandman:
> > > > Hmmm, ok, that seems to actually wait for the file to
> > > > be saved and closed... But what does "+%d" do? It only opens
> > > > an empty file named "+d%" in bbedit?
> > >
> > > Lewis:
> > > IIRC it puts the cursor on the line following the headers, but
> > > it's been awhile since I used BBEdit for USENET.
> >
> > Sandman:
> > Oh, maybe they've changed it. Here's from the manual:
>
> > +<line number>, filename:<line number> Go to line number. For
> > example, to select line 33:
>
> The %d is telling slrn to substitute the number of the line after
> the headers (or the first line in the post). SO BBEdit will see, for
> example
> bbedit -w --resume +17
Ah, so that's what's not working. I'm calling it from a shell script. But that's ok, I don't need the cursor to be anywhere special.
While we're at it. Here is my shell script:
-----------------------
#!/bin/bash
IFS=' '
read -a array <<< "${SSH_CONNECTION}";
remotehost=${array[0]}
myhost=${array[2]}
echo sftp://sandman@${myhost}/$1
ssh sandman@${remotehost} /usr/local/bin/bbedit -w --resume sftp://sandman@${myhost}/$1
-----------------------
Do you know if there is any way to reuse the currently available SSH connection? This command doesn't work when I'm behind a router. the "sftp" part is just fine, but it's specifically the "ssh sandman@${remotehost}" that isn't working.
(remotehost in this script is my Mac, myhost is my Linux server)
If I echo $SSH_CONNECTION, I get "<ip> #nr <ip> #port" <- so the #nr might be in reference to the SSH connection (it's not a pid).
Any ideas?
--
Sandman[.net]
Technical Details
Message-ID:
<slrnllrsg5.6ls.mr@irc.sandman.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border2.nntp.dca3.giganews.com!backlog4.nntp.dca3.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mailReferences:
<slrnlli521.m49.mr@irc.sandman.net> <slrnlljq4i.la8.g.kreme@amelia.local> <slrnllkjnr.pp6.mr@irc.sandman.net> <slrnllr3im.2ii.g.kreme@amelia.local> <slrnllrr62.6ls.mr@irc.sandman.net> <slrnllrrmk.1e5e.g.kreme@amelia.local>Show Full Headers
Complete Article Headers
Message-ID: <slrnllrsg5.6ls.mr@irc.sandman.net> Subject: Re: slrn and remote editor via ssh Date: Mon, 28 Apr 2014 06:12:43 +0000 From: Sandman <mr@sandman.net> References: <slrnlli521.m49.mr@irc.sandman.net> <slrnlljq4i.la8.g.kreme@amelia.local> <slrnllkjnr.pp6.mr@irc.sandman.net> <slrnllr3im.2ii.g.kreme@amelia.local> <slrnllrr62.6ls.mr@irc.sandman.net> <slrnllrrmk.1e5e.g.kreme@amelia.local> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border2.nntp.dca3.giganews.com!backlog4.nntp.dca3.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Newsgroups: news.software.readers Lines: 53 X-Trace: individual.net /R+MR/V7tSkrpRSBUoVskQ/7PyWKBBF56llLTHvJT32Uz3Dno= Cancel-Lock: sha1:ITb12YRjE15cijXYZ87Xj6JsJ1U= User-Agent: slrn/pre1.0.0-18 (Linux) X-Original-Bytes: 2626