This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
aix:scripts_tips [2021/01/01 21:21] 127.0.0.1 external edit |
aix:scripts_tips [2023/06/07 17:38] (current) manu |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | |||
| + | ==== csv file ==== | ||
| + | |||
| + | reorder member in csv file | ||
| + | <cli prompt='#'> | ||
| + | # cat $file1 | awk -F';' '{ t = $3 ; $3 = $1; $1 = t; print; }' OFS=';' | sed 's/;/,/g' | awk -F',' '{ t = $2 ; $2 = $1; $1 = t; print; }' OFS=',' | sort > $file1.1 | ||
| + | </cli> | ||
| + | |||
| http://blog.fpmurphy.com/2008/10/ksh93-date-manipulation.html#sthash.oZOsKv15.dpbs | http://blog.fpmurphy.com/2008/10/ksh93-date-manipulation.html#sthash.oZOsKv15.dpbs | ||
| Line 122: | Line 130: | ||
| ===== List file permissions in octal ===== | ===== List file permissions in octal ===== | ||
| + | |||
| + | If you have the rpm package installed : coreutils | ||
| + | <cli prompt='#'> | ||
| + | root@aixtest /etc> /opt/freeware/bin/stat -c "%a %n" /var/adm/wtmp.1.gz | ||
| + | 664 /var/adm/wtmp.1.gz | ||
| + | root@aixtest /etc> /opt/freeware/bin/stat -c "%a %n" /var | ||
| + | 755 /var | ||
| + | </cli> | ||
| + | |||
| + | |||
| To be able to apply permissions on files, first save the permissions in octal format, it will be easier to recover all permissions: | To be able to apply permissions on files, first save the permissions in octal format, it will be easier to recover all permissions: | ||