23.04.2024, 20:29 UhrDeutsch | English
Hallo Gast [ Registrierung | Anmelden ]

Neues Thema eröffnen   Neue Antwort erstellen
Vorheriges Thema anzeigen Druckerfreundliche Version Einloggen, um private Nachrichten zu lesen Nächstes Thema anzeigen
Autor Nachricht
w1av
Titel: help with script file  BeitragVerfasst am: 10.06.2006, 03:09 Uhr



Anmeldung: 26. Okt 2005
Beiträge: 146
Wohnort: Out There
Hello....I made a small script just fooling around with learning some basics....it cleans the cookies out of the ./dillo directory. The script looks like this:

#!/bin/bash
rm cookies


There is a hidden directory in my /home/bob which is "./dillo. So the script is very basic and works. What I need to do is use an "if not exist" statement so that if there is no cookies file, I wont get an error message. I am not sure how to do this. I tried this:

if not exist goto exit
:exit


figured it may not work....looks more like DOS syntax....can anyone help????
Lachen

_________________
"Kanotix....what, me worry?!"
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
schnorrer
Titel: help with script file  BeitragVerfasst am: 10.06.2006, 03:14 Uhr



Anmeldung: 09. Jan 2006
Beiträge: 1720

#!/bin/bash

if exist /.dilo/cookies
rm ~/.dilo/cookies
fi
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
Beiträge vom vorherigen Thema anzeigen:     
Gehe zu:  
Alle Zeiten sind GMT + 1 Stunde
Neues Thema eröffnen   Neue Antwort erstellen
Vorheriges Thema anzeigen Druckerfreundliche Version Einloggen, um private Nachrichten zu lesen Nächstes Thema anzeigen
PNphpBB2 © 2003-2007 
 
Deutsch | English
Logos and trademarks are the property of their respective owners, comments are property of their posters, the rest is © 2004 - 2006 by Jörg Schirottke (Kano).
Consult Impressum and Legal Terms for details. Kanotix is Free Software released under the GNU/GPL license.
This CMS is powered by PostNuke, all themes used at this site are released under the GNU/GPL license. designed and hosted by w3you. Our web server is running on Kanotix64-2006.