LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 04: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, 04:38 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,838

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
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, 04: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, 04:57 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,838

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
http://lmgtfy.com/?q=i+want+use+arra...hell+scripting
 
Old 10-31-2014, 05: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, 06:50 AM   #6
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,007

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
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, 08:15 AM   #7
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
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 08:16 AM.
 
  


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

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

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

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