LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-31-2014, 05:27 AM   #1
srinureddy
LQ Newbie
 
Registered: Oct 2014
Posts: 11

Rep: Reputation: Disabled
Array variables


->How to declare array variables and how to store data in array variables.
-> i want to store csv file data in array variable in column wise.
 
Old 10-31-2014, 05:38 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,786

Rep: Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888
what language? In case of bash you only need to check the man page and look for arrays. Additionally you can search for a lot of tutorials, examples on the net.
 
Old 10-31-2014, 05:42 AM   #3
srinureddy
LQ Newbie
 
Registered: Oct 2014
Posts: 11

Original Poster
Rep: Reputation: Disabled
thank u pan64

i want use array variable in shell scripting. i want to store csv file data into array and also retrieve it.
i saw in net but i couldn't find it. pl z help me.
 
Old 10-31-2014, 05:57 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,786

Rep: Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888
http://lmgtfy.com/?q=i+want+use+arra...hell+scripting
 
Old 10-31-2014, 06:15 AM   #5
srinureddy
LQ Newbie
 
Registered: Oct 2014
Posts: 11

Original Poster
Rep: Reputation: Disabled
thank u pan64

i am searching many sites but i couldn't find. i want to store csv file data in array variable.
 
Old 10-31-2014, 07:50 AM   #6
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,550

Rep: Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898
The first 5 links alone in that search explain bash arrays and how to assign to them. You may need to explain further what your issue is?
 
Old 10-31-2014, 09:15 AM   #7
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 5,840
Blog Entries: 12

Rep: Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010
Quote:
Originally Posted by srinureddy View Post
i want use array variable in shell scripting. i want to store csv file data into array and also retrieve it.
i saw in net but i couldn't find it. pl z help me.
@srinureddy:

Then look up BASH scripting, there are various guides available and the subject is proliferate enough that a simple web search couldn't possibly miss getting you guides which would benefit you. Make an attempt at a script. The forum is not here for people to just give you answers, participants here do so of their own free time and will. Forum guidelines are that we do not provide answers for homework assignments or give answers just for the sake of it. The guidelines instead are that if someone has an assignment, school or work and posts what they've tried as well as where they're stuck, people will give you help leading to an answer. The more effort you put forth, the more applicable the answers are. Merely saying "I looked but didn't understand" and "Please Help!!" are not really going to get you much further.

The other part of this is: "Who knows your expertise in scripting versus, not?" If you can't even write a two-line script; sort of a waste for someone to offer even the most simplest array example.

Look at a BASH guide, they have fundamental examples of arrays right in the guide. Write a script to assist you with that. Creating a CSV file is also something very simple to accomplish.

Last edited by rtmistler; 10-31-2014 at 09:16 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Load variables into an array xwassyx Linux - Software 12 03-22-2012 02:16 PM
[SOLVED] Using Array variables rwallingford Linux - Newbie 4 04-26-2011 09:19 PM
bash: use file as input into array, parse out other variables from array using awk beeblequix Linux - General 2 11-20-2009 11:07 AM
Adding array variables together nobody123 Linux - Newbie 2 02-26-2009 05:43 PM
BASH - Array Variables Micro420 Programming 5 12-15-2006 06:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:43 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration