Buscar hilos
Buscar mensajes
Buscar wikis
Buscar noticias
Consolas
Juegos
Scene
Tecnología
Internet
Otros
Invitado
Iniciar sesión
Login
|
Registrarse
Registro
Login avanzado
|
Registrarse
Al iniciar sesión aceptas nuestras
condiciones de uso y políticas de privacidad
.
Índice de foros
Índice de foros
Búsqueda avanzada
Normas
Cambiar ancho
Noticias
Consolas
Juegos
Scene
Tecnología
Internet
Otros
Multi
plataforma
General
Sistemas VR
Consolas alternativas
Google Stadia
Desarrollo
NS2
Nintendo Switch 2
PS5
PlayStation 5
Xbox
Series
Nintendo
Switch
Xbox
One
PS4
PlayStation 4
Retro
Consolas clásicas
Arcade y emulación
PS Vita
Nintendo 3DS
Wii U
PlayStation 3
Xbox 360
Wii
PSP
NDS
PlayStation 2
Xbox
GameCube
DreamCast
PlayStation
PC
Tecnología
Más
Tecnología
Off-topic
Noticias
Wiki
EOL
›
Foros
›
PC
›
Software libre
Ayuda Script BASH
Archivado
FranXp
10 jun 2008 11:57
Tezuka Kunimitsu
2.929
mensajes
desde
oct 2003
en
Cádiz
10 jun 2008 11:57
Enlace permanente
Necesito un script con un if que mire si existe un directorio es decir que mire si existe el directorio /xxx/xxx/ y si no existe que haga un mount, he estado intentandolo pero no me termina de funcionar bien, a ver si me podeis ayudar.
#46825#
10 jun 2008 13:37
10 jun 2008 13:37
Enlace permanente
Esto iría mejor en software libre.
#!/bin/bash
if [ ! -d /xxx/xxx/ ]; then
mount ...
fi
Raharu
10 jun 2008 20:17
Simpatitzant
1.615
mensajes
desde
ago 2003
Página web de Raharu
10 jun 2008 20:17
Enlace permanente
Ni siquiera necesitas el if
[ ! -d /xxx/xxx ] && mount ...
EDIT: Ni lanzar /bin/bash, con /bin/sh va que chuta
Saludos
Ferdy
10 jun 2008 22:37
/dev/annoying
4.370
mensajes
desde
abr 2003
Página web de Ferdy
10 jun 2008 22:37
Enlace permanente
El código original, quitando el shebang, también debería funcionar con /bin/sh
- ferdy
3
respuestas
Archivado
Volver a
Software libre
Términos y condiciones
|
GDPR
|
Publicidad
©1999-2025
Algunos derechos reservados