Search and store value from .csv | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Search and store value from .csv

Shell Programming and Scripting


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 02-15-2013
yadavricky yadavricky is offline
Registered User
 
Join Date: Aug 2009
Last Activity: 17 June 2013, 7:44 AM EDT
Posts: 40
Thanks: 21
Thanked 0 Times in 0 Posts
Search and store value from .csv

Dear All,
I am using the command to find the value from path
DYMV_STD_NAME=$( echo $file | sed 's#.*/[^_][^_]*_\([^_][^_]*\).*#\1#' )

file = RRK11234_RKY5807_SRY000_HOME_20071010.zip

It give me value DYMV_STD_NAME = RKY5807

Now i have flat as below

The contect of the file would be as below.

Home_TITLE,People_TITLE,Repo_ALIAS
HMN5530,RKY5807,/mine_repo/rike001
HMN5530,SRY6443,/mine_repo/rike001
HMN5530,ARDY001,/mine_repo/rike001

I want to store only respective value in variable For value RKY5807

in one one variable i want to store HMN5530 and in another variable /mine_repo/rike001

Please somebody can provide the code for this.
Sponsored Links
    #2  
Old 02-15-2013
Franklin52's Avatar
Franklin52 Franklin52 is offline Forum Staff  
Moderator
 
Join Date: Feb 2007
Last Activity: 30 July 2014, 2:02 PM EDT
Location: The Netherlands
Posts: 7,692
Thanks: 120
Thanked 531 Times in 502 Posts
Bumping up posts or double posting is not permitted in these forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future

Thank You.

The UNIX and Linux Forums.

Proceed here:

http://www.unix.com/shell-programmin...-grep-awk.html
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
awk read column csv and search in other csv giankan Shell Programming and Scripting 8 07-02-2012 07:36 AM
Perl search csv fileA where two strings exist on another csv fileB PerlNewbRP Shell Programming and Scripting 8 04-13-2012 07:05 AM
Execute stored procedure through script in sybase database and store the output in a .csv file amit.mathur08 Shell Programming and Scripting 8 08-18-2010 10:51 AM
Store table contents in csv file ladyAnne Shell Programming and Scripting 5 08-02-2010 08:39 AM
Does anybody know how to store my tables to a csv file? ladyAnne UNIX and Linux Applications 2 06-15-2010 03:28 AM



All times are GMT -4. The time now is 03:13 PM.