LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-22-2013, 03:25 AM   #1
ramsavi
LQ Newbie
 
Registered: May 2013
Posts: 16

Rep: Reputation: Disabled
how to read a file using shell script


hi all,
i have to read a file using shell script for example my csv file is
like this


Code:
Tid   Inputfille                  Inputfilepath
1    ABC_20141218.idr      /export/home/him60t1/input
2    ABC_20141219.idr     /export/home/him60t1/input1
what i have to do is if on my command line i type program.sh 1
then input file
Code:
ABC_20141218.idr

should be copied in filepath
Code:
/export/home/him60t1/input

and similarly if on my command line
i have 2 then the file on Tid 2 should be copied to corresponding
file path. and tid can go increasing

how should i read the csv.
can any one please help
 
Old 05-22-2013, 03:38 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
https://www.linuxquestions.org/quest...7/#post4955087
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
shell script read input from file rmugunthan Linux - Newbie 9 06-18-2012 07:45 PM
[SOLVED] Read a value from a file in shell script kushalkoolwal Programming 10 03-06-2012 05:22 PM
[Shell] Read a File from script yussef Programming 4 08-19-2008 04:26 AM
How to read data from file to use in shell script? ozymandias Linux - Newbie 7 10-27-2006 01:19 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration