User Tools

Site Tools

Creating directory /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021 failed
Writing /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021/qs_data.ser failed

Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







bash:how_to:tests

bash: "How To" ... utilize tests

operationwhatcode
stringvariable equal to “xyzif [ $STR == “xyz” ]
variable unequal to “xyzif [ $STR != “xyz” ]
variable contains substring “xyzif [[ $STR =~ “xyz” ]]
variable is in list “abc” or “def” (or …)if [[ $STR =~ ^(“abc”|“def”)$ ]]
integervariable equal to nif [ $STR -eq n ]
filenode” exists
(whatever type i.e. file, folder, …)
if [ -e “node” ]
regular “filename” existsif [ -f “filename” ]
create unique temporary filetouch /tmp/$$.tmp
find file “filename” with numerically
largest extension in folder
ls -1d “filename.*” | cut -d ”.” -f 2 | sort -rg > /tmp/$$.tmp
MAX=$(head -n 1 /tmp/$$.tmp)
executionresult of command executionRSLT=$?
being rootif ($(id -u) -eq 0))

work in progress

advertising
bash/how_to/tests.txt · Last modified: 2018/08/03 06:24 by Rob Stroess

Impressum Datenschutz

Creating directory /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021 failed
Writing /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021/misc_data.ser failed
Creating directory /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021 failed
Writing /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021/ip.ser failed
Creating directory /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021 failed
Writing /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021/pages.ser failed
Creating directory /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021 failed
Writing /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021/ua.ser failed
Creating directory /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021 failed
Writing /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021/page_users.ser failed