c15dfa04d1
* Update nlogin: Better file handling. Allows for future additional files to be copied. * Add SCP: Efficiently copy files to remote systems * add path2arg: uupath tool
15 lines
No EOL
519 B
QBasic
15 lines
No EOL
519 B
QBasic
REM Convert a uupath to arguments (replace bangs with spaces).
|
|
REM Optionally if the first argument is a command, run it with the rest of the arguments.
|
|
REM Usage: path2arg.bas [command] <path>
|
|
IF ARGC% < 2 THEN PRINT "Usage: path2arg.bas [command] <path>" : END
|
|
|
|
HOSTNAME$=TH_SED$(TH_HOSTNAME$,"\s.*","")
|
|
PATH$=TH_SED$(ARG$,HOSTNAME$,"","g")
|
|
PATH$=TH_SED$(PATH$,"!"," ","g")
|
|
IF ARGV$(1) = "run" THEN GOTO 10
|
|
IF TH_RE(DIR$,"[^w]"+ARGV$(1),0) > 0 THEN GOSUB 10
|
|
PRINT PATH$
|
|
END
|
|
10 PRINT "Running "+PATH$
|
|
TH_EXEC PATH$
|
|
END |