Tag Info

New answers tagged


print_underlined () { word=$1 tput smul print $word tput sgr0 }


A bit more perlish: echo 1397028688|perl -l12ne 'print scalar localtime $_' Wed Apr 9 09:31:28 2014


There are ksh specific commands/options/shortcuts/features that won't work or work differently with zsh, and there are even more zsh specific things that would fail under ksh. If your goal is to write scripts, my advice would be to stick to POSIX features shared by both shells. zsh might miss some POSIX ones as compliance is not in its design objectives. ...


I am not sure, if I understand your question in its current form. If you don't care about a sub-directory with read access being placed in a directory without read access, then you can simply do: find . -type d -perm -u+r If you want to know, whether a specific user has read access to a directory, then get the group(s) she/he is a member of: groups ...


You need a do after the while: while test $count -ge 1 do ... done


You're missing the do keyword: while ...; do ... done


Using the Perl approach, with just a very basic/common modules (Time::Local and POSIX): #!/bin/ksh echo "Enter the date (YYYY/MM/DD):" read date timestamp=`perl -MTime::Local=timelocal -e '@t = split(/[-\/]/, $ARGV[0]); $t[1]--; print timelocal(1,1,1,reverse @t);' $date` YESTERDAY=`perl -MPOSIX=strftime -e 'print strftime("%Y/%m/%d", localtime($ARGV[0] ...

Top 50 recent answers are included