Manage PlItems

You may optionally enter a comparison operator (<, <=, >, >=, <> or =) at the beginning of each of your search values to specify how the comparison should be done.

Advanced Search
Displaying 91-100 of 300 results.
IDPlCodelangPlGroupPlItemTitleCode 
 
285Bash ScriptFilehandlingApplikations-/Script-Verzeichnis ermitteln#!/bin/sh # The script is located in /tmp/abc/myscript.sh export AppPath=$(dirname $0) echo $0 # /tmp/abc/myscript.sh echo $AppPath # /tmp/abcView Update Delete
43Bash ScriptSonstigesKopfzeile sh-Datei#!/bin/sh # Einfaches Beispiel ... View Update Delete
129Bash ScriptVariablenWert einer Variable zuweisen# Aktuelles Verzeichnis in einer Variable setzen mydir="Mein Verzeichnis lautet $PWD" echo $mydirView Update Delete
163Bash ScriptDatum, ZeitAktuelles Datum/Uhrzeit#!/bin/sh myDate=$(date +"%Y-%m-%d") echo $myDate # 2014-01-14 echo $(date +"%Y-%m-%d_%a") # with short dayname # 2017-01-05_Do (Do => German, localized short of Tuesday) echo $(date +"%Y-%m-%d %H:%M:%S") # 2014-01-14 22:15 # List of formatting options: https://www.cyberciti.biz/faq/linux-unix-formatting-dates-for-display/View Update Delete
167Bash ScriptProzeduren, Funktionen, MethodenDeklaration einer Funktion/Prozedur#!/bin/sh do_something() { echo $1 echo $2 } do_something "this is my first" " and second argument" # this is my first and second argumentView Update Delete
174Bash ScriptStringsStrings miteinander verbinden# http://wiki.ubuntuusers.de/Shell/Bash-Skripting-Guide_f%C3%BCr_Anf%C3%A4nger#Variablen-abgrenzen #!/bin/bash subString1="Hello" subString2='World!' echo "${subString1} ${subString2}" Hello World! echo "${subString1} ${subString2}. I'm in here ;-)" # Hello World!. I'm in here ;-)View Update Delete
175Bash ScriptFilehandlingVerzeichnis rekursiv durchsuchen# http://wiki.ubuntuusers.de/Shell/Bash-Skripting-Guide_f%C3%BCr_Anf%C3%A4nger#Variablen-Teil-2 #!/bin/bash for file in /home/myUser/*/*.png ; do echo "Diese Datei: $file" fname=$(basename "$file") echo "hat den Namen: $fname" fdir=$(dirname "$file") echo "und steht im Verzeichnis: $fdir" # Diese Datei: /home/myUser/galaxy.png # hat den Namen: galaxy.png # und steht im Verzeichnis: /home/myUser View Update Delete
176Bash ScriptFilehandlingPrüfen ob Datei existiert# http://wiki.ubuntuusers.de/Shell/Bash-Skripting-Guide_f%C3%BCr_Anf%C3%A4nger#If-Else-Anweisung #!/bin/bash filePath="/home/myUser/test.txt" if [ -f ${filePath} ] then echo "There it is! ;-)" else echo "Whow, file is missing at this place :-(" fiView Update Delete
242Bash ScriptFallunterscheidungWenn-Dann AbfrageVAR1=1 VAR2=2 if [ "$VAR1" -eq "$VAR2" ]; then echo "true"; else echo "false"; fi # falseView Update Delete
243Bash ScriptDatum, ZeitGestriges Datum#!/bin/sh myDate=$(date +"%Y-%m-%d" -d "yesterday") echo $myDate # 2014-01-13 myDate2=$(date -d @$(( $(date +"%s") - 86400)) +"%Y-%m-%d") # 014-01-13 # today: $(date +"%Y-%m-%d") # 2014-01-14 # Hint: -d parameter doesn't work on Solaris View Update Delete