\label{doc_help_kdb-sget_md_md_doc_help_kdb_sget}%
\Hypertarget{doc_help_kdb-sget_md_md_doc_help_kdb_sget}%
 \hypertarget{doc_help_kdb-sget_md_autotoc_md2676}{}\doxysection{SYNOPSIS}\label{doc_help_kdb-sget_md_autotoc_md2676}
{\ttfamily kdb sget $<$key name$>$ $<$default-\/value$>$}

Where {\ttfamily key name} is the name of the key to retrieve and {\ttfamily default-\/value} is the value that should be printed if no value can be retrieved.\hypertarget{doc_help_kdb-sget_md_autotoc_md2677}{}\doxysection{DESCRIPTION}\label{doc_help_kdb-sget_md_autotoc_md2677}
This command is used to retrieve the value of a key from within a script. When using the kdb tool in a script, the user should use the {\ttfamily sget} command in place of the kdb-\/get(1) command. The kdb-\/get(1) command should not be used in scripts because it may return an error instead of printing a value in certain circumstances. The {\ttfamily sget} command guarantees that a value will be printed (unless the user passes faulty arguments). This command will either print the value of the key it retrieves or a default value that the user specifies.\hypertarget{doc_help_kdb-sget_md_autotoc_md2678}{}\doxysection{OPTIONS}\label{doc_help_kdb-sget_md_autotoc_md2678}

\begin{DoxyItemize}
\item {\ttfamily -\/H}, {\ttfamily -\/-\/help}\+: Show the man page.
\item {\ttfamily -\/V}, {\ttfamily -\/-\/version}\+: Print version info.
\item {\ttfamily -\/p}, {\ttfamily -\/-\/profile $<$profile$>$}\+: Use a different kdb profile.
\item {\ttfamily -\/C}, {\ttfamily -\/-\/color $<$when$>$}\+: Print never/auto(default)/always colored output.
\end{DoxyItemize}\hypertarget{doc_help_kdb-sget_md_autotoc_md2679}{}\doxysection{EXAMPLES}\label{doc_help_kdb-sget_md_autotoc_md2679}
To get the value of a key from a script or return the value {\ttfamily 0}\+:~\newline
 {\ttfamily kdb sget user\+:/example/key 0}

To get the value of a key using a cascading lookup or return the value {\ttfamily notfound}\+:~\newline
 {\ttfamily kdb sget /example/key \char`\"{}notfound\char`\"{}}\hypertarget{doc_help_kdb-sget_md_autotoc_md2680}{}\doxysection{SEE ALSO}\label{doc_help_kdb-sget_md_autotoc_md2680}

\begin{DoxyItemize}
\item \mbox{\hyperlink{doc_help_kdb-get_md}{kdb-\/get(1)}}
\item \mbox{\hyperlink{doc_help_elektra-key-names_md}{elektra-\/key-\/names(7)}} for an explanation of key names. 
\end{DoxyItemize}