#!/bin/bash menu_name="$1" if [ -n "$menu_name" ]; then last_selection=$(cat "/tmp/fzfopen_$menu_name" 2>/dev/null) fi options_list=$( "/tmp/fzfopen_$menu_name" selected_value=$(echo -e "$options_list" | grep "$selected" | sed -r 's/^\w*\s+(.*)$/\1/g') echo "$selected_value"