Repository

Looks good to me!

User Tools

Site Tools


kb:tools:bash

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
kb:tools:bash [23 months ago ( 2 May 2023)] – external edit 127.0.0.1kb:tools:bash [3 weeks ago (17 March 2025)] (current) Justin
Line 26: Line 26:
     echo "$i : ${array[$i]}"     echo "$i : ${array[$i]}"
 done done
 +</code>
 +
 +Enforce sudo requirement:
 +
 +<code>
 +if [ `id -u` -ne 0 ]; then
 +    echo Need sudo
 +    exit 1
 +fi
 </code> </code>
kb/tools/bash.txt · Last modified: 3 weeks ago (17 March 2025) by Justin