08-26-2009
Have you used a dos/windows editor?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: netresearch
3 Replies
2. Shell Programming and Scripting
Hi Guys,
I have a file which has numbers in it separated by newlines as follows:
1.113
1.456
0.556
0.021
-0.541
-0.444
I am using the following code to store these in an array in bash:
FILE14=data.txt
ARRAY14=(`awk '{print}' $FILE14`) (6 Replies)
Discussion started by: npatwardhan
6 Replies
3. Shell Programming and Scripting
Hi
I want to store the file names into an array.
I have written like this but I am getting error.
declare -A arr_Filenames
ls -l *.log | set -A arr_Filenames $(awk '{print $9}')
index=0
while (( $index < ${#arr_Filenames
})); do
Current_Filename=${arr_Filenames}
... (5 Replies)
Discussion started by: dgmm
5 Replies
4. Shell Programming and Scripting
Hi,
I have few variable say 10
ex:-
l_pc_291334_01_0_01_00.cmp
l_pc_441133_50_0_02_00.cmp
l_pc_441133_55_0_02_00.cmp
Each variable value is coming via loop on a table.
I want to create a script that stores these value to a table or array ( But one by one not all at one time as... (4 Replies)
Discussion started by: amitkumar.b2
4 Replies
5. Shell Programming and Scripting
Hi,
I have the following code which is giving error mentioned below. Please can you support on this. Also suggest how can we access all the items against single vasservicename in circlename array,i.e, vasservicename say MTSTV will be available to all circles which are mentioned in the array... (2 Replies)
Discussion started by: siramitsharma
2 Replies
6. Shell Programming and Scripting
I am trying to look through one of my directories to remove certain files. I am pretty new to Unix and bash so I just need a little help in starting this. I know I would have to write two loops one to iterate the directories and one to iterate the files. How would I write the loops? (3 Replies)
Discussion started by: totoro125
3 Replies
7. Shell Programming and Scripting
I need to run the same awk function over an entire directly of files.
This is the awk:
awk '{$(NF+1)=1}1'
Is there a way that I can run this command once over all of the files, along the lines of:
awk '{$(NF+1)=1}1' *
so that I do not have to run this several times?
My main concern is... (2 Replies)
Discussion started by: owwow14
2 Replies
8. Shell Programming and Scripting
Hi,
I am trying to do something similar to the for loop example from KSH For Loop Array: Iterate Through Array Values
$: cat y.ksh
#!/bin/ksh
# set array called nameservers
set -A nameservers 192.168.1.1 192.168.1.5 202.54.1.5
# print all name servers
for i in ${nameservers}
do
... (3 Replies)
Discussion started by: newbie_01
3 Replies
9. Shell Programming and Scripting
I'm trying to achieve the follwoinig with no luck.
Find the directories that are greater than 50GB in size and pick the owner of the directory as I would like to send an alert notification.
du -sh * | sort -rh
139G Dir_1
84G Dir_2
15G Dir_3
ls -l Dir_1
drwx------ 2... (3 Replies)
Discussion started by: 308002184
3 Replies
10. UNIX for Beginners Questions & Answers
Hi ,
I am a total beginner so bear with me.
I have the below code which works . I need to extend it by iterating thru the array arr and executing a command in each loop. some thing on the lines of below.
I need to run this in a Jenkins script , so I would need below
bash script to run... (6 Replies)
Discussion started by: SVRao19056
6 Replies