| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Some linux code co commands |
* Crossposted in area LINUX, LINUX_BBS
Hello All!
I am trying make some script jump by some if statement like the one in dos commands.
In dos commands is it like this:
---snip---
if exist nodelist.(day) then goto latest
else
copy nodelist.(oldday) d:\fido\makenl\z115fake\
goto chckfile1
:latest
copy nodelist.(day) d:\fido\makenl\z115fake\
:chckfile1
rem
rem some other checks commands herunder.
----cut----
In linux I have this command and functions in mind nad use.
---snip---
if [ -a nodelist.${num} ]; then goto latest; fi
else
cp nodelist.${oldnum} /home/fido/makenl/z115fake/
goto chckfile
:latest
cp nodelist.${num} /home/fido/makenl/z115fake/
:chckfile
####
# some other linux command and functions for check and move files here under.
---snip---
The linux command and function shall could check if the new julian dat
nodelist/pasnlist is copied to a place and if it not is the julian day file
then jump to another section and copy the latest there is, but if it there
is the julian day file cp it and jump over the section for the old file
copy.
it could maybe just be done with 2 line of if statements.
if [ -a nodelist.${oldnum ]; then copy nodelist.${oldnum}; fi
if [ -a nodelist.${num} ]; then copy nodelist.${num}; fi
so the function only copy the old nodelist when it not find the julian fay
nodelist there will be the next weeks nodelist.
Take care,
Gert
- Get the best with linux -
--- Msged/LNX 6.2.0 (Linux/2.6.33-gentoo-r2 (x86_64))
* Origin: * The KofoBBS at http://www.kofobbs.dk * (2:230/150)SEEN-BY: 3/0 633/267 640/954 712/0 313 550 848 @PATH: 230/150 261/38 712/848 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.