Logo 
Search:

Unix / Linux / Ubuntu Articles

Submit Article
Home » Articles » Unix / Linux / Ubuntu » Homework HelpRSS Feeds

Shell Script to read data from a file

Posted By: Alyssa Campbell     Category: Unix / Linux / Ubuntu     Views: 9974

Write a Shell Script to read data from a file.

Code for Shell Script to read data from a file in Unix / Linux / Ubuntu

$vi read.sh
echo “enter the name of the file for read content”
read  file1
cat $file
echo “completed “


OUTPUT
***********
[04mca58@LINTEL 04mca58]$ sh read.sh
enter the name of the file for read content
a.txt
1
2     2
3     3    3
4     4    4   4
completed
  
Share: 


Didn't find what you were looking for? Find more on Shell Script to read data from a file Or get search suggestion and latest updates.

Alyssa Campbell
Alyssa Campbell author of Shell Script to read data from a file is from Toronto, Canada.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!