I am trying to assign the contents of file e.g
ls "$HOME"
into an array. If it is possible then please guide me without using the concept of awk,sed, and perl16
Thanks (10 Replies)
Hi,
I do have a file and the contents are as follws:
10
20
30
40
50
Now I want to store those values into an array. How can be done this ?? (3 Replies)
I have an array "arrA" with the following contents:
A0012 Paint Shop.doc
ES001 Contract Signature.doc
Budget Plan.pdf
TS PWS.pdf
My data file "Files.dat" has the same contents:
A0012 Paint Shop.doc
ES001 Contract Signature.doc
Budget Plan.pdf
TS PWS.pdf
I have a script that compares... (0 Replies)
Dear all,
I have a file having the following formats:
ThreadFail=Web1=1234
ThreadFail=Web2=2345
ThreadFail=Web3=12
ConnectionFail=DB1=11
ConnectionFail=DB2=22
The number of lines will be different from every time . How can I parse the file and store the result to an a array inside... (6 Replies)
I want to store contents of command
dir in array of variables
For eg: dir contents are
command d2 demovi~ file inven java new untitled folder
d1 demovi er1 filename inven~ myfiles ubuntu desktop xmms
-----------------------------------
I... (3 Replies)
Hi all,
I am working on a backup based script, in which it enters to a directory and check the sub-directories and copy the names into an array.
cd $CPFs
k=0
for i in *
do
if
then
ARRs="$i"
k=$(($k+1))
#echo "$i"
... (19 Replies)
Hi Gurus,
I am trying for a scenario where in I want to read the contents of a file line by line and then store them in variables. Below is the script:
#!/bin/ksh
while read line
do
id=`echo $line | cut -f1 -d |`
name=`echo $line | cut -f2 -d |`
echo $id
... (11 Replies)
Hi,
I have a bash script that currently holds some data. I am trying to write all the contents to a file called temp.txt.
I am using
echo ${array} > temp.txt
The problem that I am experiencing is that the elements are being written horizontally in the file. I want them written... (5 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
We must do the following for a massive coding project that is due at 12:20PM on Monday, July 22, 2013. We are to... (1 Reply)