Junior
Kaip parašyti sąlygą vienoje eilutėje Bash?
sobes.tech AI
Atsakymas iš AI
# Failo egzistavimo ir rašymo teisių nebuvimo patikra
if [ -f "myfile.txt" ] && ! [ -w "myfile.txt" ]; then echo "Failas egzistuoja, bet neturi rašymo teisių"; fi
sobes.tech AI
Atsakymas iš AI
# Failo egzistavimo ir rašymo teisių nebuvimo patikra
if [ -f "myfile.txt" ] && ! [ -w "myfile.txt" ]; then echo "Failas egzistuoja, bet neturi rašymo teisių"; fi