Forum: developers


RE: tac [ Reply ] By: joke evers on 2016-06-19 13:18 | [forum:17430] |
Thanks ! It's fine with me. However advising to install system-wide (e.g. in /bin , /usr/bin , /usr/local/bin) could lead to problems with system management (e.g. non-wims) scripts etc. That's why I -personally- have installed GNU tac,date,stat in $wimshome/other/bin. The new management installed_software_check recognizes the correct versions and works fine ! Joke |
RE: tac [ Reply ] By: Bernadette Perrin-Riou on 2016-06-19 08:37 | [forum:17429] |
After having thinking over this problem, i think that the installation of this gnu utilities should be installed with the system and not inside the script compile, as other tools as pari, octave ... or fortune (!). What I will add is a warning in the manager page if the utilities tac or (stat, date) with the option asked (that is stat -c and date -d) are not operational.) We will add some remarks in the wiki for the installation. Hope it is OK. Bernadette |
RE: tac [ Reply ] By: joke evers on 2016-06-12 08:30 | [forum:17417] |
A final remark on this off-topic: It seems that the compatibility problems between GNU linux and my server system of choice (FreeBSD) with "tac" , "date" and "stat" can not be resolved using modifications of the concerning wims-proc-files. The only realistic mode to solve this issue is to implement a locally install ( in "~/other/bin") by user "wims" of the GNU versions of "stat" , "date" and "stat" programs as provided by GNU coreutils. This could also work for other non-GNU unix-like systems. Joke Evers |
RE: tac [ Reply ] By: joke evers on 2016-03-30 07:41 | [forum:17229] |
in not too many places; I've only tested in adm/new (just because is gave annoying errors on my new server...) modules/adm/new/modif.proc: data=!sh tail -$limit modules/Changelog.modif | tac | grep . modules/adm/new/new.proc: data=!sh tail -$limit modules/Changelog.new | tac | grep . modules/adm/class/config/scripts/readlog.sh: tac $w_wims_home/log/classes/$w_wims_class/.log can be replaced by: ( tac || tail -r ) < $w_wims_home/log/classes/$w_wims_class/.log 2>/dev/null modules/adm/class/cdt/proc/readlog.sh: tac $w_wims_home/log/classes/$w_wims_class/cdt/connect.log | cut -d" " -f1,3,4 modules/adm/class/cdt/proc/readlog.sh: tac $w_wims_home/log/classes/$w_wims_class/cdt/connect.log |
RE: tac [ Reply ] By: joke evers on 2016-03-30 07:04 | [forum:17228] |
There is a functional alternative for "tac" in module "adm/new" ,that has no need to call for "perl"...that works fine on linux and bsd ### data=!sh tail -$limit modules/Changelog.modif | ( tac || tail -r ) 2>/dev/null datacnt=!linecnt $data ### |
RE: tac [ Reply ] By: joke evers on 2016-03-29 21:30 | [forum:17226] |
Not a good idea! It seems that "tail -r" is not supported on Linux; only on OSX/BSD* joke |
tac [ Reply ] By: joke evers on 2016-03-29 08:04 | [forum:17216] |
In some wims adm-scripts the program "tac" is used. Please note that on many systems this reverse "cat" is not installed per default. (it is not part of the core utils) Possible alternatives: A command line "tail -r some_file" will produce a reverse list...or as shell function: tac() { tail -r -- "$@"; } copied from: http://unix.stackexchange.com/questions/114041/how-can-i-get-the-tac-command-on-os-x joke |