LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Array variables (https://www.linuxquestions.org/questions/linux-newbie-8/array-variables-4175523875/)

srinureddy 10-31-2014 04:27 AM

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.

pan64 10-31-2014 04:38 AM

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.

srinureddy 10-31-2014 04:42 AM

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.

pan64 10-31-2014 04:57 AM

http://lmgtfy.com/?q=i+want+use+arra...hell+scripting

srinureddy 10-31-2014 05:15 AM

thank u pan64
 
i am searching many sites but i couldn't find. i want to store csv file data in array variable.

grail 10-31-2014 06:50 AM

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?

rtmistler 10-31-2014 08:15 AM

Quote:

Originally Posted by srinureddy (Post 5262312)
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.


All times are GMT -5. The time now is 12:34 AM.