Tag Info

Hot answers tagged

3

No, there is unfortunately no history support in the SVR4 release of vi. Note it is not vi version 4 but "Version SVR4.0, Solaris 2.5.0". This version string is hardcoded and reported even in recent releases (Solaris 2.5 is something like 18 years old). Starting from Solaris 11, vim is bundled with the OS.


3

To see installed memory you can use this command: $ prtconf | grep Memory Memory size: 65408 Megabytes There's also prtdiag -v | grep Memory. Additional methods are shown here: Used memory on Solaris 10.


3

$ top -bn1 | grep free KiB Mem: 8117084 total, 6578888 used, 1538196 free, 302216 buffers KiB Swap: 8060924 total, 26004 used, 8034920 free, 1564856 cached $ top -bn1 | grep -oP '\S+(?=\s+free)' 1544132 8034920 requires GNU grep, but you've tagged "linux", so you're OK For just the "Mem": top -bn1 | grep -oP 'Mem.*\s\K\S+(?=\s+free)'


2

I got my system updated by downloading 4.3 bash source code and patches from ftp.gnu.org/gnu/bash and compiling it to replace the existing code. It works, now waiting for more patches.


2

Using GNU sed (Linux only): top -bn1 | sed -rn '/Mem/{s/.* ([^ ]*) free.*/\1/p;}' Using any sed: top -bn1 | sed -n '/Mem/{s/.* \([^ ]*\) free.*/\1/p;}' Using perl: top -bn1 | perl -lne '/Mem.* ([\d]+)\s*free/ && print $1' Using a tool designed for the job (tested on Linux, not sure if free is available on Solaris): free | awk '/Mem/{print ...


2

awk -v RS="[, ]" '/free/{print a}{a=$0}' Explanation Set the record separator to , and space, so the number preceding every string is a record in itself, and so is the string. Having everything as its own record, awk will process every item one by one For all the records before free it will ignore the {print a} because the condition doesn't match, and it ...


1

To support alternative key mappings you can use the GNU readline library's inputrc init file. Each user can have their own .inputrc file in their home directory. To check the current key map, enter verbatim mode (Ctrl-v) followed by the key to map. This will prevent the shell from parsing and executing the key and provide the key sequence. E.g. Ctrl-v ...


1

Answering my own question: This is a known issue with Sun SSH. The best workaround I found is to detect "Sun_SSH" in output of ssh -V and apply something like this: #!/bin/bash # .... ( ssh host 'localCommand' | remoteCommand || pkill -P $BASHPID ) You may also use $$ instead of $BASHPID in other shells or in simpler situations (if your shell doesn't have ...


1

The bc that comes with Solaris is quite historic. To get the same bc feeling as on Linux just install the gbc OpenCSW package.



Only top voted, non community-wiki answers of a minimum length are eligible