10 More Discussions You Might Find Interesting
1. Programming
I'm writing my own simple XML parser as an experiment. It's a lot more complicated than it's supposed to be.
Things supposedly forbidden in XML comments happen all the time in the wild. You're never, ever supposed to find -- inside <!-- xml comments --> but in practice, you don't just find... (2 Replies)
Discussion started by: Corona688
2 Replies
2. Shell Programming and Scripting
I have an edge-list with nodes, edge.txt
A B
B J
J H
C A
G H
G A
A C
K G
I have another file which tells me which of these nodes are important, input.txt
G
C
A (3 Replies)
Discussion started by: Sanchari
3 Replies
3. UNIX for Dummies Questions & Answers
I have file input
1/1/2013 1AS030A 0 1083 CHINA
1/1/2013 1AS030B 0 675 KOREA
1/1/2013 1AS035A 162 662 CHINA
1/1/2013 1AS035B 51 799 INDIA
1/1/2013 1AS035C 0 731 CHINA
1/2/2013 1AS073A 10 1375 KOREA... (5 Replies)
Discussion started by: radius
5 Replies
4. Shell Programming and Scripting
Korn Shell
I have hundreds of small files like below created every day. A midnight cron job moves them to the location /u04/temp/logs
But sometimes I have to manually move these files based a certain dates or time.
I have two basic requirements
1.Using mv command I want to move all .dat... (2 Replies)
Discussion started by: kraljic
2 Replies
5. UNIX for Dummies Questions & Answers
I write this bit of code to calculate the mean and variance for all the files in one directory and print the mean and variance in a separate folder but with the same file name.
FILES="data/*"
for X in $FILES
do
name=$(basename $X)
awk '{x=$0; s+=$0; n++}
END{mean=s/n; for (i in x){ss... (20 Replies)
Discussion started by: A-V
20 Replies
6. Shell Programming and Scripting
Hello, I am working on a coding project for a class and to test the program I have created, I have come up with 100 different test cases. The program takes four text files as input, so each of the test cases is contained in a folder with four files.
I have a folder called 'tests', within which... (1 Reply)
Discussion started by: dpryor
1 Replies
7. Programming
I'm currently making a card dealing program, it is suppose to display a list of cards like this:
"Ace of Heart, is red"
"Two of Heart, is red"
.
.
"Ace of Spade, is black"
and so on for all suits and numbers.
here is my current code:
#include <stdio.h>
#include <stdlib.h>
#include... (3 Replies)
Discussion started by: Izzy123
3 Replies
8. Shell Programming and Scripting
Hello, I'm a computer science major and I'm having problems dealing with file names with spaces in them. Particularly I'm saving a file name in a variable and then using the variable in a compare function i.e.
a='te xt.txt'
b='file2.txt'
cmp $a $b
If anyone could help me with this particular... (10 Replies)
Discussion started by: jakethegreycat
10 Replies
9. Shell Programming and Scripting
I have a process run weekly where I must convert data formats for about thirty files. I read a text file that provides all of the filenames and switch settings.
My perl code is:
for ($j = 1; $j <= $k; $j++)
{
open(FIN2,$fin2) || die "open: $!";
do other stuff
}
Every once in... (2 Replies)
Discussion started by: joeyg
2 Replies
10. Shell Programming and Scripting
I am readinga file lin by line and based craeting a arry of unique elemenst from the second column of the line. However when i coem out of the while loop my array becomes empty , can eny one tell me what I would be doing wrong
#!/bin/bash
logfile="./mylog.dat"
begin=100
end="$(( $begin +... (5 Replies)
Discussion started by: jojan
5 Replies