![]() |
Re: Help - Bash script
right like this ? i attached the file
i can use this to compare check='cat /home/user/.profiled/current' if [ $profilo = $check ]: then ...... i did a long work :D i could cut the way and the time :D |
Re: Help - Bash script
ok maybe the script works, how can i compare functions with if then else?
i wrote if 1rstcheck then echo "1rst check exists" else 2ndcheck then echo "2nd check exists" else 3rdcheck then echo "3rd check exists" but it doesnt work... |
Re: Help - Bash script
Quote:
Code:
if condition1; then Code:
#! /bin/sh If you end up using functions, bash provides scope for variables (unlike standard Bourne shell). Code:
#! /bin/bash Code:
foo="$(cat "$filename")" And finally, you may want to proect your script against unset variables. Code:
test "$variable" = "yes" |
All times are GMT. The time now is 20:13. |
vBulletin® Version 3.8.8