Search

Changing the delimiter of read

The read command is used to accept value for a variable as input. Read,by default, continues to accept input untill the return key is not pressed. Thus the return key acts are the delimiter.

The delimiter can be set to any other chatacter we want by using the option "-d" with read.
i.e.



For example :



In the above case "," will act as the delimiter and read will stop accepting input as soon as "," is entered.

2 comments:

  1. I'm happy I found this blog! From time to time students want to cognitive the keys of productive literary essays composing. Your first-class knowledge about this good post can become a proper basis for such people. Thanks.
    www.fadeplex.com

    ReplyDelete
  2. Substantially the article is really the best on this laudable topic. I concur with your conclusions and will eagerly look forward to your future updates.Just saying thank you will not just be enough for the wonderful lucidity in your writing.
    sell house as is

    ReplyDelete

Follow by Email