10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi guys
Let me explain at first what I'm trying to do. My input file looks like this.
1280
Surfaces
Pt 0.00000000000000 0.00000000000000 0.00000000000000
Pt 2.81138845918055 0.00000000000000 0.00000000000000
Pt 5.62277691836110 0.00000000000000 ... (5 Replies)
Discussion started by: saleheen
5 Replies
2. Shell Programming and Scripting
Hi, im new to shell scripting. i have a query for which i have searched your forums but coulndt get what i need.
i have a file that has two records of exactly the same length and format and they are comma seperated. i need to save the first and the second columns of the input file to 2 different... (11 Replies)
Discussion started by: atikan
11 Replies
3. Shell Programming and Scripting
hi all, i have a data file that contains 2 columns, names and numbers. i need to read names in to a an array call names and numbers in to an array call numbers. i also have # and blank lines in my dat file and i need to skip those when i read the dat file. how do i do this? btw, my column 1 and... (3 Replies)
Discussion started by: usustarr
3 Replies
4. Shell Programming and Scripting
Hi all,
I have a file that contains many lines, but only a few are of my interest, so I'm cutting it with grep + awk, and the result I get is for example
line 0
line 1
line 2
line 3
line n
Now I want to store each line in an array "cell" so I can use it later calling to
${array},... (2 Replies)
Discussion started by: TuxSax
2 Replies
5. Shell Programming and Scripting
Hi there, i have been trying different methods and i wonder if somebody could explain to me how i would perform a comparison on two arrays for example
my @array1 = ("gary" ,"peter", "paul");
my @array2 = ("gary" ,"peter", "joe");
I have two arrays above, and i want to something like this... (5 Replies)
Discussion started by: hcclnoodles
5 Replies
6. UNIX for Dummies Questions & Answers
Dear All,
I'm porting my scientific program from 32 to 64 bit system
(use gcc, CentOS) and feel myself absolutely confused
after reading general internet advices for that. Could you help me,
please.
The question is:
can I use "old style" on 64 bit:
--------
int * myIntArray;
... (3 Replies)
Discussion started by: German1234
3 Replies
7. Web Development
PHP question...
I have an SQL query that's pulled back user IDs as a set of columns. Rather than IDs, I want to use their names.
So I have an array of columns $col with values 1,7,3,12 etc and I've got an array $person with values "Fred", "Bert", "Tom" etc
So what I want to do is display the... (3 Replies)
Discussion started by: JerryHone
3 Replies
8. Shell Programming and Scripting
Hi,
I am trying to use arrays in my script but can not seem to get it to work.
I have a file called sections, this contains headers from a tripwire log file, separated by "@" but could be "," if easier
The headers will be used to cut sections from the log file into another to be mailed.
... (5 Replies)
Discussion started by: pobman
5 Replies
9. Shell Programming and Scripting
Ok; here is the code
INCREMENT=0 #Final Count
MATCH=0 #Treated as a Boolean
declare -a LINEFOUR #Declared Array
for FILE in $DIR; do # DIR was declared earlier
test -f $FILE && (
TEMP=(sed -n '4p' $FILE) #How do I assign the fourth line of the file to TEMP? This doesn't... (1 Reply)
Discussion started by: Asylus
1 Replies
10. Programming
Ok this is probably pretty easy but I'm stuck.
My program reads the contents of a txt file and stores the string into a char array called buff. The contents of the text file is a string of a txt file name. So basically buff has this value "file.txt\0". The last part is the null character. I want... (3 Replies)
Discussion started by: johnsonmj
3 Replies