r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Linux] group for linux REBOL users

Alan
15-Mar-2008
[2030]
installed=installer
btiffin
15-Mar-2008
[2031]
yeah; one of the last frontiers; ease of use.  But it is progressing. 
 It's a little bit too sad that the y2k thing gutted IT money (not 
that the whole .com thing didn't need a good slap to the face) but 
there were some corporate players taking all their funny money and 
setting up OSS departments.  That died an untimely death imho, while 
corporate got mad about spending billions to protect against fudiciary 
responsibility around legacy code and then got nothing in return. 
 No more funny money for the IT department ... since?  So now we 
rely on one of "us" to get the itch and dig in.   Some do.  But it 
is time consuming and somewhat boring clicking through the same installer 
screen 1000 times to cover (some fraction of) all  the bases.  :)
Graham
21-Mar-2008
[2032x2]
Any shell users here?
I want to create a backup script that calls a backup utility, but 
I want to create the target file with today's date and time.
btiffin
21-Mar-2008
[2034x2]
look to touch
or is it more nerd and little bit gross sexy, to say
man touch
Graham
21-Mar-2008
[2036x2]
sorry, I wasn't clear .. I want to name the file with today's date 
and time.
I could use Rebol to create the backup script on the fly I guess 
and then run it.
btiffin
21-Mar-2008
[2038x3]
$ a=`date +%D`
$ echo $a
$ mv $backupfile $a
# use date --help to see the plethora of date format specs
Those are backticks.  Assuming bash.
Oh and no space  a=`  a = `  not the same
Graham
21-Mar-2008
[2041]
thanks Brian.
btiffin
22-Mar-2008
[2042]
:)
Robert
22-Mar-2008
[2043]
Graham, why not use Rebol for it at all? No need for shell scripts.
Graham
22-Mar-2008
[2044]
because it's faster to use shell scripts .. me thinks
Gregg
22-Mar-2008
[2045]
Faster to write, or faster to run? I recently had to move a bunch 
of data and used XXCopy, because I thought it would be faster than 
REBOL (couldn't get robocopy for the old W2K machine I needed it 
on). After it took 34 hours to copy the data, I'm pretty sure REBOL 
would have been just as fast, or faster.
Graham
22-Mar-2008
[2046]
cp -u /source/* /target/ 

is a lot shorter than writing it in REBOL.
Anton
27-Mar-2008
[2047x2]
Did anyone find a method to determine if a file is actually a symlink 
?
I'm trying to fix my recursive file searcher. My wine installation 
creates some symlinks which point up to a parent directory, creating 
an infinite loop.
btiffin
27-Mar-2008
[2049]
I'd start with get-modes ... 'file-modes  but I can't test from here 
on Win98
Anton
27-Mar-2008
[2050]
I'll try it.
btiffin
27-Mar-2008
[2051]
and then 'port-modes and ???
Anton
27-Mar-2008
[2052]
file-modes doesn't seem to have anything

>> print mold new-line/all/skip get-modes %Desktop get-modes %Desktop/ 
'file-modes on 2
[
    status-change-date: 26-Mar-2008/12:29:33+11:00
    modification-date: 26-Mar-2008/12:29:33+11:00
    access-date: 27-Mar-2008/13:29:25+11:00
    owner-name: "anton"
    group-name: "anton"
    owner-id: 1000
    group-id: 1000
    owner-read: true
    owner-write: true
    owner-execute: true
    group-read: true
    group-write: false
    group-execute: true
    world-read: true
    world-write: false
    world-execute: true
    set-user-id: false
    set-group-id: false

    full-path: %/home/anton/.wine/dosdevices/c:/windows/profiles/anton/Desktop
]
btiffin
27-Mar-2008
[2053]
You could look to 'copy-modes but I doubt it

Otherwise you'll need to call/info with one of the bash test commands. 
  -h I think.
Anton
27-Mar-2008
[2054x2]
That would need to be done for every file and would slow down the 
filesearch considerably.
Thanks for the ideas.
btiffin
27-Mar-2008
[2056]
in that case, I'd shell script the tests and then  call/output  it
Anton
27-Mar-2008
[2057x3]
That's an idea. But you have to admit it's messy.
It would be much nicer if rebol could find out this information directly.
I'm going to check RAMBO.
btiffin
27-Mar-2008
[2060]
Yep. yep.  Good.  :)
Anton
27-Mar-2008
[2061]
submitted a Wish
btiffin
27-Mar-2008
[2062]
Yeah if you do go bash, (I'm not sure how you get your file list) 
ls -F will append @ to links instead of looping over test -h
Anton
27-Mar-2008
[2063]
I'm not sure I want to pursue that route at the moment. It makes 
for more brittle code. But I will note it down if there is no alternative.

I've noticed that the Windows build running in Wine seems to be "immune" 
to symbolic links (which I think just makes an access error, and 
be ignored.)
Graham
29-Mar-2008
[2064]
On gnome, you have this system tray which on Ubuntu is at the top 
right.  Anyone know how to place an icon there as in windows?
Gabriele
29-Mar-2008
[2065]
i bet there's some CORBA involved ;)
Kaj
29-Mar-2008
[2066x2]
It's just a panel. Right-click on a panel and choose Add to add applets 
to them
If you mean how to write such an applet, you'll have to look up the 
documentation. It's probably done in C and there are likely some 
bindings to languages such as Python
Graham
29-Mar-2008
[2068x2]
and Rebol ?
Isn't this a little inconsistent?

dir? %/root
== true
read %/root
== ""
read %/root/
== [ %.bashrc ..... etc ]
BrianH
29-Mar-2008
[2070]
Yeah. That second example should fail.
Robert
30-Mar-2008
[2071x4]
Any SSH / OpenVPN experts here? I have a little strange problem. 
I run my SSHD on port 443, so that I can connect to it via a HTTPS 
proxy. Than I use "dynamic portforwarding" to tunnel all kind of 
applications through the SSH connect.
The setup works but from time to time the port forwarding is stalling. 
The forwarded connection is initiated (I can't check if it's made 
successfully ) but that's it. It hangs. Than after some time (a couple 
of days) it's working without any problems.
My problem is, I don't know how I can track down the problem. The 
logs don't contain anything.
BTW: The hanging happens even for connection to "localhost". But 
those connections are resolved via the machine name and a DNS lookup. 
The DNS server is operated by an external provider.
Izkata
30-Mar-2008
[2075x2]
Graham's talking about the Notification Area applet, not gnome-panel 
itself

And as far as I know, it's not doable yet.
I have some C code that creates an icon in there, but nothing more.
Graham
30-Mar-2008
[2077x2]
If I wish to upgrade/replace the binary I am currently running, and 
I am running it from a symlink, can I just overwrite the target file?
or do I need to use a shell script ?
BrianH
30-Mar-2008
[2079]
If you know what the target file is, then you can overwrite it if 
you have the permissions. Finding out what the target file is may 
need a shell command though.