I’ve got a function for starting a process, and then returning the stdout and exit code. However I’ve noticed that it claims that every process returns the exit code of 1. I control the executable being invoked and I had it print to stdout the exit code, so I’ve confirmed that when it “…
Tag: linux
deactivate:unset:1: no such hash table element: pydoc
I am trying to setup my new laptop’s development environment. After install zsh I am constantly getting error deactivate:unset:1: no such hash table element: pydoc Please help. I have following simple aliases in my zshrc: Answer You can see virtualenv pr on github. or you can change deactivate () functi…
get available memory in gb using single bash shell command
following command returns available memory in kilobytes cat /proc/meminfo | grep MemFree | awk ‘{ print $2 }’ can some one suggest single command to get the available memory in gb? Answer Just a slight modification to your own magical incantation: P.S.: Dear OP, if you find yourself invoking grep …
Elixir: Installing Elixir on Ubuntu kills running Couch DB instance
Recently tried to install Elixir on Ubuntu 12.0.4 with the instructions found here (basically using apt-get install elixir) – http://elixir-lang.org/install.html Once the installation had completed, I found that I could not reach the CouchDB instance running on – http://localhost:5984. So I tried …
grep mac address – 2 consecutive lines
My file consists of scan results. Each result can have 4-20 lines I want to filter only MAC addresses for Successful (Passed scans) My file: I would like to extract list of mac addressees that Passed scans. So in example if line contains “PASSED” and next line or 2 contain mac address … prin…
sh file can’t work well but commands in sh can
I’m using a bash shell to export some path,like this: env.sh: after call sh env.sh,I call echo $GOPATH ,but nothing output,and I call export again to check the variables exported,but GOPATH isn’t included.But when I copy these commands in the shell file,and execute them directly in command line,it…
Bash – Locate Script and Execute with Options
I did a good bit of searching and testing on my own, but I can’t seem to find the best way to achieve this goal. I would like to have a bash one liner that will find a script on the machine, execute the script and have the ability to add switches or needed information in my case to execute
How tar xvfz works in cygwin?
I tried tar with xvfz and -xvfc both didn’t work in Cygwin on Windows. Here cmd tar with ‘-‘ Question : 1 . How does tar works with – or without _ ? Please suggest to execute tar -xvfz sshpass-1.0.5.tar.gz. Answer tar has 3 types of syntax (according to this ): long options (–fil…
Error while loading shared libraries: libboost_iostreams.so.1.59.0: cannot open shared object file: No such file or directory
I am running a C++ executable on ubuntu. The executable links into some boost libraries. This is the output when I attempt to run the binary: What should be the future coarse of action i should take to remove this error. Answer Let’s assume your library is being exist but not in standard paths and you&#…