This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
linux:scripts:basics [2014/06/05 15:21] – lunetikk | linux:scripts:basics [2018/12/20 17:44] – Discussion status changed lunetikk | ||
---|---|---|---|
Line 3: | Line 3: | ||
===== Commands ===== | ===== Commands ===== | ||
- | ^Command^What it does^ | + | ^ Command |
+ | | # | ||
| VAR=var | | VAR=var | ||
| $VAR | inserts var whereever $VAR is placed | | $VAR | inserts var whereever $VAR is placed | ||
| case - esac | inserts case | | | case - esac | inserts case | | ||
- | | if - fi | inserts | + | | if [ " |
===== Troubleshooting ===== | ===== Troubleshooting ===== | ||
Line 13: | Line 14: | ||
==== Interpreter error ==== | ==== Interpreter error ==== | ||
- | Problem: | + | === Problem: |
- | Running your script prompts | + | Running your script prompts |
- | Fix: \\ | + | === Fix: === |
Open your script with vi and execute the following | Open your script with vi and execute the following | ||
< | < | ||
- | ==== Cant run scripts | + | ==== Not enough rights |
- | Problem: | + | === Problem: |
Running your script requires more rights | Running your script requires more rights | ||
- | Fix:\\ | + | === Fix: === |
- | Make your script | + | Make your script |
< | < | ||
+ | \\ | ||
+ | \\ | ||
+ | ~~DISCUSSION: | ||