Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

executable file 26 lines (23 sloc) 914 Bytes
#! /bin/sh
if [ $# -lt 1 ]; then
echo "Usage: $0 <question>"
exit 1
fi
uname=$(uname)
if [ $uname = 'Linux' ]; then
osname=$(cat /etc/os-release | grep -w NAME | awk -F '=' '{print $2;}' | awk -F '"' '{if (NF==3) {print $2} else {print $1}}' | awk '{print $1}')
if [ $osname = 'CentOS' ]; then
version=$(cat /etc/system-release | awk '{print $4}')
fi
if [ -z $version ]; then
version=$(cat /etc/os-release | grep -w VERSION_ID | awk -F '=' '{print $2;}' | awk -F '"' '{if (NF==3) {print $2} else {print $1}}')
fi
else
osname=$uname
version=$(uname -r)
fi
major_version=$(echo $version | awk -F '.' '{print $1}')
minor_version=$(echo $version | awk -F '.' '{print $2}')
vars="uname=[[$uname]] osname=[[$osname]] major_version=[[$major_version]] minor_version=[[$minor_version]]"
question=$*
curl --data "question=[[$question]] vars=[[$vars]]" http://www.fastken.com/fastken/search/unix
You can’t perform that action at this time.