Go Back   SEQanswers > Bioinformatics > Bioinformatics

Similar Threads
Thread Thread Starter Forum Replies Last Post
Print selected columns from a text file __sequence Bioinformatics 1 10-17-2017 05:29 PM
ID conversion in a csv from a text file entry zillur Bioinformatics 0 03-04-2017 07:28 AM
text file editing Liy General 1 06-20-2015 01:29 PM
convert a text file in fasta with decollpasing Giorgio C Bioinformatics 3 03-29-2013 11:48 AM
Text file editing_perl-GFF bioman1 Bioinformatics 0 07-05-2012 09:47 AM

Thread Tools
Old 10-29-2018, 02:43 AM   #1
Junior Member
Location: India

Join Date: Aug 2018
Posts: 5
Default How do I read a variable from a text file in shell?

I want to insert in my script a value (string) that I would read from a text file.

For example: I have shell script
echo "Enter your name:"
read name
echo "...and now your age:"
read age

# example of how to use the values now stored in variables $name and $age
echo "Hello $name. You're $age years old, right?"

and the input file (called
shubk is offline   Reply With Quote

linux, shell

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -8. The time now is 12:54 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO