simple way to read an array in ksh


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers simple way to read an array in ksh
# 1  
Old 07-28-2010
simple way to read an array in ksh

hi,
I'm a newbie to shell scripting. I wanted to initialise an array using basic for loop and read it.
Then i want to print it as a .CSV file..
Any help would me much appreciated..
# 2  
Old 07-29-2010
Is this homework?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to pass and read an array in ksh shell script function.?

I'm able to read & print an array in varaible called "filelist" I need to pass this array variable to a function called verify() and then read and loop through the passed array inside the function. Unfortunately it does not print the entire array from inside the funstion's loop. #/bin/ksh... (5 Replies)
Discussion started by: mohtashims
5 Replies

2. Shell Programming and Scripting

PERL : Read an array and write to another array with intial string pattern checks

I have an array and two variables as below, I need to check if $datevar is present in $filename. If so, i need to replace $filename with the values in the array. I need the output inside an ARRAY How can this be done. Any help will be appreciated. Thanks in advance. (2 Replies)
Discussion started by: irudayaraj
2 Replies

3. Shell Programming and Scripting

simple remove command -ksh

KSH A simple remove command is not workin for me. The user has all the access and the return code after remove command is 0. But I am still able to find the file. I have the code as below. tmplog=/tmp/$fl_nm.$$ main () { --set of statments rm -fr $tmplog RC=$? } (2 Replies)
Discussion started by: tostay2003
2 Replies

4. Shell Programming and Scripting

simple array problem

Hello experts, I need help in my code. I have an input file like this: 100814 1205 1724127 7451382 -10 00:30:1b:48:92:3a 100814 1206 1724127 7451382 -72 00:30:1b:48:92:3a 100814 1207 1724127 7451382 -72 00:30:1b:48:90:3b 100814 1208 1724127 7451382 -72 00:30:1b:48:92:3a 100814 1209... (12 Replies)
Discussion started by: enes71
12 Replies

5. Shell Programming and Scripting

Simple list file ls to an array

Hi all, Simple question, how can I simply create an array from listing the files in a directory i..e myvar=`ls`; echo $myvar gives a fulllist of files/ directories how can I now convery myvar to an array so I can loop around and read each file/dir? Thnaks CF:) (6 Replies)
Discussion started by: cyberfrog
6 Replies

6. Shell Programming and Scripting

using array in ksh

hi all, need help with putting names in an array, i have a few servers which i look up by doing a 'find . -name "*.pid' and the format of the output is like following : ./servername/myserver.pid i was wondering how can i iterate through and store each name in one array my code is... (1 Reply)
Discussion started by: cesarNZ
1 Replies

7. UNIX for Dummies Questions & Answers

Simple Array in Ksh Scripting

Ksh Scripting Can some one give me a simple example of array operations using ksh. For Ex: week_array = {Sunday Monday Tuesday Wednesday Thursday Friday Saturday} I want to assign and retrieve and print them along with their index. I am looking for the o/p like: 0 Sunday 1 Monday ... (2 Replies)
Discussion started by: ravikirankethe
2 Replies

8. Shell Programming and Scripting

need help with simple awk/ksh script

I need help finding out why this script wont run. The chmod is okay, but i get an error saying that I need '&&' on line 5. (18 Replies)
Discussion started by: tefflox
18 Replies

9. Shell Programming and Scripting

Simple ksh script problem

This is a search script that I have developed. It finds the records that I look for. However the only thing I want the program to do now is to display a message such as 'Not Found' to appear when a record is not found. So far when a search doesn't display a record, the screen is blank. ... (14 Replies)
Discussion started by: Warrior232
14 Replies

10. Shell Programming and Scripting

Simple ksh question

Hi, Simple question I am sure... I need to put yesterdays date in the name of a filename, ie assign yesterdays date to a variable and then I can use it where I want.. using the format yyyymmdd Any suggestions? (1 Reply)
Discussion started by: frustrated1
1 Replies
Login or Register to Ask a Question