Re: OT: bashfråga
Peter Krefting <[email protected]>
| Newsgroups | gmane.linux.debian.user.swedish |
|---|---|
| Organization | /universe/earth/europe/norway/oslo |
| Message-ID | <[email protected]> |
[email protected]: > Skulle naturligtvis kunna skriva ett C-program som ger mig exakt det > men jag skulle vilja göra det i ett bash-script. http://lmgtfy.com/?q=cut+newline+from+end+of+line+linux+bash ger mig: date +"%Y%m%d_%H%M%S" | xargs echo -n Fast det ger tre binärer (date, xargs och echo), då kanske Perl kan vara snabbare: perl -e 'use POSIX;print strftime("%Y%m%d_%H%M%S",localtime)' -- \\// Peter - http://www.softwolves.pp.se/ -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: https://lists.debian.org/[email protected]