\label{doc_help_kdb-basename_md_md_doc_help_kdb_basename}%
\Hypertarget{doc_help_kdb-basename_md_md_doc_help_kdb_basename}%
 \hypertarget{doc_help_kdb-basename_md_autotoc_md2798}{}\doxysection{SYNOPSIS}\label{doc_help_kdb-basename_md_autotoc_md2798}
{\ttfamily kdb basename $<$key name$>$}

Where {\ttfamily key name} is the name of the key.\hypertarget{doc_help_kdb-basename_md_autotoc_md2799}{}\doxysection{DESCRIPTION}\label{doc_help_kdb-basename_md_autotoc_md2799}
This command is used to retrieve the basename of a key.\hypertarget{doc_help_kdb-basename_md_autotoc_md2800}{}\doxysection{RETURN VALUES}\label{doc_help_kdb-basename_md_autotoc_md2800}
This command will return the following values as an exit status\+:


\begin{DoxyItemize}
\item 0\+: No errors.
\item 7\+: invalid key name passed, see \mbox{\hyperlink{doc_help_kdb_md}{kdb(1)}} for a list of return codes used by kdb.
\end{DoxyItemize}\hypertarget{doc_help_kdb-basename_md_autotoc_md2801}{}\doxysection{OPTIONS}\label{doc_help_kdb-basename_md_autotoc_md2801}

\begin{DoxyItemize}
\item {\ttfamily -\/n}, {\ttfamily -\/-\/no-\/newline}\+: Suppress the newline at the end of the output.
\end{DoxyItemize}\hypertarget{doc_help_kdb-basename_md_autotoc_md2802}{}\doxysection{EXAMPLES}\label{doc_help_kdb-basename_md_autotoc_md2802}

\begin{DoxyCode}{0}
\DoxyCodeLine{kdb basename user:/key/subkey}
\DoxyCodeLine{\#> subkey}
\DoxyCodeLine{}
\DoxyCodeLine{kdb basename user:/key/subkey/}
\DoxyCodeLine{\#> subkey}
\DoxyCodeLine{}
\DoxyCodeLine{kdb basename /}
\DoxyCodeLine{\#>}

\end{DoxyCode}
\hypertarget{doc_help_kdb-basename_md_autotoc_md2803}{}\doxysection{SEE ALSO}\label{doc_help_kdb-basename_md_autotoc_md2803}

\begin{DoxyItemize}
\item See \mbox{\hyperlink{doc_help_kdb-namespace_md}{kdb-\/namespace(1)}} and \mbox{\hyperlink{doc_help_kdb-dirname_md}{kdb-\/dirname(1)}} for other namepart extraction operations.
\item The Unix analogue \mbox{[}BASENAME(1)\mbox{]}.
\item To get keys in shell scripts, you can use \mbox{\hyperlink{doc_help_kdb-sget_md}{kdb-\/sget(1)}}.
\item \mbox{\hyperlink{doc_help_elektra-key-names_md}{elektra-\/key-\/names(7)}} for an explanation of key names. 
\end{DoxyItemize}