---
title: "Discussion on \"How To Use select command in bashscript\" | Hashnode"
description: "Discussion on \"How To Use select command in bashscript\". Imagine that you are creating a script that lets user selects one file out of many files in directory. well this can be achived in different ways \nThe Hard Way\n#!/bin/bash\ncontent=$(dir);\nstr=\"`echo $content`\";\nread -r -a list <<<${str};\nread -p \"Ent..."
url: "https://hashnode.com/posts/how-to-use-select-command-in-bashscript/6073d6061494367be6d2ba96"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How To Use select command in bashscript](https://codeboard.hashnode.dev/how-to-use-select-command-in-bashscript?utm_source=hashnode&utm_medium=feed)

Imagine that you are creating a script that lets user selects one file out of many files in directory. well this can be achived in different ways The Hard Way #!/bin/bash content=$(dir); str="\`echo $content\`"; read -r -a list <<<${str}; read -p "Ent...

Apr 12, 2021 · 1 min read · codeboard.hashnode.dev  
Read the article

-   [#bash](https://hashnode.com/tag/bash)
-   [#linux](https://hashnode.com/tag/linux)
-   [#howtos](https://hashnode.com/tag/howtos)

## Written by

[Prakash Choudhary](https://hashnode.com/@prakash326)

@prakash326

  
[View profile](https://hashnode.com/@prakash326)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
