Strict Standards: Declaration of Walker_Page::start_lvl() should be compatible with Walker::start_lvl($output) in /homepages/21/d19413512/htdocs/SITES/haegele.info/tim/wp-includes/classes.php on line 584

Strict Standards: Declaration of Walker_Page::end_lvl() should be compatible with Walker::end_lvl($output) in /homepages/21/d19413512/htdocs/SITES/haegele.info/tim/wp-includes/classes.php on line 584

Strict Standards: Declaration of Walker_Page::start_el() should be compatible with Walker::start_el($output) in /homepages/21/d19413512/htdocs/SITES/haegele.info/tim/wp-includes/classes.php on line 584

Strict Standards: Declaration of Walker_Page::end_el() should be compatible with Walker::end_el($output) in /homepages/21/d19413512/htdocs/SITES/haegele.info/tim/wp-includes/classes.php on line 584

Strict Standards: Declaration of Walker_PageDropdown::start_el() should be compatible with Walker::start_el($output) in /homepages/21/d19413512/htdocs/SITES/haegele.info/tim/wp-includes/classes.php on line 603

Strict Standards: Declaration of Walker_Category::start_lvl() should be compatible with Walker::start_lvl($output) in /homepages/21/d19413512/htdocs/SITES/haegele.info/tim/wp-includes/classes.php on line 702

Strict Standards: Declaration of Walker_Category::end_lvl() should be compatible with Walker::end_lvl($output) in /homepages/21/d19413512/htdocs/SITES/haegele.info/tim/wp-includes/classes.php on line 702

Strict Standards: Declaration of Walker_Category::start_el() should be compatible with Walker::start_el($output) in /homepages/21/d19413512/htdocs/SITES/haegele.info/tim/wp-includes/classes.php on line 702

Strict Standards: Declaration of Walker_Category::end_el() should be compatible with Walker::end_el($output) in /homepages/21/d19413512/htdocs/SITES/haegele.info/tim/wp-includes/classes.php on line 702

Strict Standards: Declaration of Walker_CategoryDropdown::start_el() should be compatible with Walker::start_el($output) in /homepages/21/d19413512/htdocs/SITES/haegele.info/tim/wp-includes/classes.php on line 727

Strict Standards: Redefining already defined constructor for class wpdb in /homepages/21/d19413512/htdocs/SITES/haegele.info/tim/wp-includes/wp-db.php on line 58

Deprecated: Assigning the return value of new by reference is deprecated in /homepages/21/d19413512/htdocs/SITES/haegele.info/tim/wp-includes/cache.php on line 99

Strict Standards: Redefining already defined constructor for class WP_Object_Cache in /homepages/21/d19413512/htdocs/SITES/haegele.info/tim/wp-includes/cache.php on line 404

Deprecated: Assigning the return value of new by reference is deprecated in /homepages/21/d19413512/htdocs/SITES/haegele.info/tim/wp-includes/query.php on line 21

Deprecated: Assigning the return value of new by reference is deprecated in /homepages/21/d19413512/htdocs/SITES/haegele.info/tim/wp-includes/theme.php on line 576
Tims Wein- und IT-Blog » Blog Archive » bash, awk, IFS

Strict Standards: mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /homepages/21/d19413512/htdocs/SITES/haegele.info/tim/wp-includes/functions.php on line 19

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /homepages/21/d19413512/htdocs/SITES/haegele.info/tim/wp-includes/functions.php on line 28

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /homepages/21/d19413512/htdocs/SITES/haegele.info/tim/wp-includes/functions.php on line 30

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /homepages/21/d19413512/htdocs/SITES/haegele.info/tim/wp-includes/functions.php on line 32

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /homepages/21/d19413512/htdocs/SITES/haegele.info/tim/wp-includes/functions.php on line 33

Strict Standards: mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /homepages/21/d19413512/htdocs/SITES/haegele.info/tim/wp-includes/functions.php on line 19

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /homepages/21/d19413512/htdocs/SITES/haegele.info/tim/wp-includes/functions.php on line 28

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /homepages/21/d19413512/htdocs/SITES/haegele.info/tim/wp-includes/functions.php on line 30

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /homepages/21/d19413512/htdocs/SITES/haegele.info/tim/wp-includes/functions.php on line 32

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /homepages/21/d19413512/htdocs/SITES/haegele.info/tim/wp-includes/functions.php on line 33

bash, awk, IFS

IFS steht für internal Filed Separator und ist als Shell Variable definiert.
Bei einem for i in … Konstrukt sind die Felder in der Standard Einstellung durch ein Leerzeichen, TAB oder newline markiert. Will aber eine Datei verarbeiten die einen anderen Feld Trenner verwendet muss man IFS anpassen:

LINE='root:x:0:0:root:/root:/bin/bash'
IFS=:
for i in $LINE ; do echo $i ; done
root
x
0
....

awk bildet eine Ausnahme und missachtet IFS. Es kocht sein eigenes Süppchen und ist damit flexibler:
awk ' BEGIN { FS = ":" } ; { print$1 }' < /etc/passwd | head -1

Auch sort bietet sinnvollerweise die Möglichkeit den Separator selbst zu bestimmen:
sort -n -t ':' -k 3 /etc/passwd

Leave a Reply

You must be logged in to post a comment.