In PicoLisp, there is often a situation where you want to execute a command with the * argument.
Bash shell expands * to the list of filenames, but PicoLisp doesn't.
Here are two workarounds for this bash command:
grep -l "let" *| # (MIT) | |
| # v1 | |
| (setq *Mystr "09:56:51 up 6:46, 1 user, load average: 0.81, 0.45, 0.36") | |
| (extract pack (mapcar clip (split (stem (chop *Mystr) "l" "o" "a" "d" "a" "v" "e" "r" "a" "g" "e" ":") ","))) |
| # MIT Licensed | |
| # | |
| #(c) 2017 Alexander Williams, Unscramble <license@unscramble.jp> | |
| # | |
| # IPv4 "24" -> "255.255.255.0" | |
| [de cidr-to-netmask (Mask) | |
| (let (Pos (- 5 (/ Mask 8)) | |
| Val (& (>> (- (- 8 (% Mask 8))) 255) 255) ) | |
| (glue "." |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!-- | |
| This file is part of GtkSourceView | |
| Author: Paolo Borelli <pborelli@gnome.org> | |
| Copyright (C) 2006-2007 Paolo Borelli | |
| GtkSourceView is free software; you can redistribute it and/or | |
| modify it under the terms of the GNU Lesser General Public |
| (patch _htHead | |
| '(case (lowc (till " ^M^J" T)) @S) | |
| (fill '(case (lowc (till " ^M^J" T)) | |
| ("auth-hash:" (setq *AUTH_HASH (pack (cdr (line))))) | |
| ("auth-cookie:" (setq *AUTH_COOKIE (pack (cdr (line))))) | |
| ("auth-token:" (setq *AUTH_TOKEN (pack (cdr (line))))) | |
| . @S) ) ) |
I recently ran into an issue of MongoDB shell commands not working. The error message was:
Invariant failure !driverName.empty() && !driverVersion.empty() && !osType.empty() && !osName.empty() && !osArchitecture.empty() && !osVersion.empty() src/mongo/rpc/metadata/client_metadata.cpp
I ran an strace on the mongo command and saw it was trying (and failing) to open the following files:
| # Suppress WRITE SAME messages | |
| disks=`find /sys | grep max_write_same_blocks` | |
| for i in $disks; do | |
| [ -f "$i" ] && echo 0 > "$i" | |
| done |
If you get the error message: "No Package matching 'yum-downloadonly'"
Well it's because the package was renamed in RHEL6, but CentOS 6 only recently removed it, so now you must refer to yum-plugin-downloadonly instead.
Snippet from here: https://access.redhat.com/solutions/10154
(RHEL5)
| diff --git a/etc/init.d/tc-config b/etc/init.d/tc-config | |
| index f6002dd..c44876c 100755 | |
| --- a/etc/init.d/tc-config | |
| +++ b/etc/init.d/tc-config | |
| @@ -25,6 +25,8 @@ addUser(){ | |
| # Main | |
| +[ -f "/opt/preboot.sh" ] && /opt/preboot.sh | |
| + |