[H-GEN] Detaching in putty (was Script E-book ?)
QuarkAV.com - Hilton Travis
hilton at quarkav.com
Sat Feb 21 23:55:57 EST 2009
On 22/02/2009 1:21 PM, David Duffy wrote:
> David Duffy wrote:
>> Greg Black wrote:
>>> On 2009-02-22, David Duffy wrote:
>>>
>>>
>>>> I've searched online and have found enough examples and docs to get me
>>>> started (loops, if then, echo, exit, etc) but can't figure out how to
>>>> split a directory name into it's parts.
>>>>
>>>> eg: From the directory "/foo/bar/" I want to just get "bar" (and add an
>>>> extension) so I can use that in my script as a filename.
>>>>
>>>
>>> Look at basename and dirname.
>>>
>>
>> I can't seem to get the syntax right. How do you get basename to work
>> with directories that have spaces? eg. "foo/bar \2/"
>>
>> # Set the output filename
>> OutFileName="`basename $MovieDir`.mkv"
>>
>> The problem is that OutFileName is assigned the value "bar.mkv"
>> instead of "bar 2.mkv" but I'm a little lost of how to fix that.
>
> OK, I got this sorted. It turns out OutFileName did contain the
> correct (full) name. My problem was that the spaces were still not
> escaped, and when fed to the video codec without quotes got truncated
> again! I added quotes to the codec parameters and it's all working
> well now.
>
> This means I can now give the box a bunch of directories to process
> while I'm not here. Now, my next question; I can start this batch in
> putty from a Windows box, but if I close the putty ssh session, it
> will terminate. I'd like to somehow start the batch, detach from it
> and (optionally) get back into it to see how it's going. Is this
> possible? The box the script is running on has no monitor.
> David...
> --
> ___________________________________________
> David Duffy Audio Visual Devices P/L
> Unit 8, 10 Hook St, Capalaba 4157 Australia
> Ph: +61 7 38235717 Fax: +61 7 38234717
> Our Web Site:www.audiovisualdevices.com.au
> ___________________________________________
>
G'day David,
Would "screen" be what you're looking for here?
- HiltonT
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.humbug.org.au/pipermail/general/attachments/20090222/b9841988/attachment.html>
More information about the General
mailing list