Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 104725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T01:19:36+00:00 2026-05-11T01:19:36+00:00

Problem: Customer X is a Windows user who wants to be able to trigger

  • 0

Problem: Customer X is a Windows user who wants to be able to trigger pre-packaged bash commands by using mnemonic keywords or ‘tag hints’ when she is logged in to her RedHat box via shell.

Example: Customer X logs into host using ssh and wants to do some routine file operations. She wants to be able to type

copy file 

and get back a listing of pre-fab fill-in-the-blank bash commands to choose from

cp <@source@> <@dest@>               ### simple copy cp -R <@startdir@>  <@destdir@>      ### recursive copy 

she then wants to be able to select one of these items, fill in the blank(s) and just hit enter to run the command.

Customer X is willing to specify ahead of time what commands she is likely to want to use (in windows-speak) and then hire the developer to translate those into bash commands, and then put them together in a script that allows her to talk windows-speak to bash and get back the list of commands.

NOTE: Customer X doesn’t like apropos because it assumes familiarity with terms used in bash, as opposed to windows-speak. For example:

 apropos shortcut 

doesn’t give her anything about creating symlinks (even though that is exactly what she wants) because she doesn’t know what windows shortcuts are called in linux. Obviously, windows concepts don’t carry over 100% so she will have to learn eventually, but she’s a busy person and is asking for this as a way to ‘ease’ her into linux understanding.

Question: What is the best way to get started on something like this? Is there a perl, python, ruby script out there that does something like this already? Is there something in bash that can simulate this kind of feature request?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T01:19:37+00:00Added an answer on May 11, 2026 at 1:19 am

    What you probably want is to override bash’s command-not-found handler. Here’s the section in /etc/bash.bashrc in a standard Ubuntu install that installs the handler:

    ... # if the command-not-found package is installed, use it if [ -x /usr/lib/command-not-found ]; then         function command_not_found_handle {                 # check because c-n-f could've been removed in the meantime                 if [ -x /usr/lib/command-not-found ]; then                    /usr/bin/python /usr/lib/command-not-found -- $1                    return $?                 else                    return 127                 fi         } fi ... 

    In effect, if a command is not found, a user specified program is executed with that command as a parameter. In the case of Ubuntu, it’s a Python program that checks to see if the command the user typed is a valid application that can be installed, and if it is, informs the user that he/she can install it.

    What you probably want to do is compare it to you hashref of commands and usage strings and display the appropriate one if there’s a match.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 81k
  • Answers 81k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer From NSMenu: - (void)addItem:(NSMenuItem *)newItem Assuming you have an NSMenu… May 11, 2026 at 4:34 pm
  • Editorial Team
    Editorial Team added an answer Why not use ASP.NET health monitoring? There's a mail provider… May 11, 2026 at 4:34 pm
  • Editorial Team
    Editorial Team added an answer For 99% of the time and for 99% of Standard… May 11, 2026 at 4:34 pm

Related Questions

When designing a user interface for an application that is going to be used
I want to enable the user to highlight a row on the WPF DataGrid
My company releases a small software product for which I've recently been taking over
Our company has a point of sale system with many extras, such as ordering

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.