Search Results

Search: Posts Made By: Bloomy
Forum: Programming 07-16-2012
4,215
Posted By Bloomy
Python: Parsing and comparing XMLs with minidom
Hi there!

I'd like to parse and compare 2 XML files with the minidom parser as follows:

I have 2 XML files with loads of data. One is in English (the source file), the other one the...
1,058
Posted By Bloomy
Regex help needed
Hello,

I'd like to write a regex that transforms a German base form of a noun into one of its inflected forms, namely

I want to translate "Haus" to "Häuser"

This is what I've got:
...
2,244
Posted By Bloomy
Ah, alright! Will try to relate that to my own...
Ah, alright! Will try to relate that to my own code then.
If someone else has a more specific idea how I could change my code so that it works, I would appreciate that. I'm relatively new to shell...
2,244
Posted By Bloomy
Hm...that doesn't seem to work for me... ...
Hm...that doesn't seem to work for me...

When I do this:


cat >file
touch ./path/dir/*
for f in ./path/dir/* ; do
if grep -qx "$f" file; then
echo "$f"
fi
done


nothing...
2,244
Posted By Bloomy
Hmm...the filenames look the same except from...
Hmm...the filenames look the same except from their numeration:

testfile_1
testfile_2
testfile_3

So if I just want testfile_1 and testfile_3 I don't really know how to grep for these lines
...
2,244
Posted By Bloomy
Look up file in list and write its path into another file
Hi

I have a script that writes the path of files into a text file. I'd like to extend it so that it writes only the paths of certain files, which are given on a list, into this text file.

The...
1,363
Posted By Bloomy
Mh...the files for reading, the script and the...
Mh...the files for reading, the script and the list are all in the same folder. Nevertheless, when I execute the script I get the message "tail: cannot open file for reading, no such file or...
1,363
Posted By Bloomy
Yes, it was the nasty back quotes! Thanks! I...
Yes, it was the nasty back quotes! Thanks!

I have a different problem now. I would like to copy the last 5 lines in each file on that list to a textfile.

I wrote this code:


for i in `cat...
1,363
Posted By Bloomy
Add sth to end of each line, but only for specific files
Hi.

I have a list with files, and I would like to add a variable to the end of each line of each file in this list. The files are in a folder together with a large number of other files which I...
1,608
Posted By Bloomy
Change lines in multiple files
Hi.

I have a folder with a large number of files and would like to apply the following changes to each line in each of the files:

sed 's/$/\/Q:_0/'

I wrote a loop, but it just changes the...
3,563
Posted By Bloomy
Thanks! I tried the first option but I received...
Thanks! I tried the first option but I received the error

cp: target `testfile.wav' is not a directory

I executed it like this:

cd'ed into the wav file directory and then:

< ../list.data...
3,563
Posted By Bloomy
Copy files on a list to another directory
Hi.

I have a list with file names like

testfile1.wav
testfile2.wav
testfile3.wav

and a folder that contains a large number of wav files (not only the ones on the list).

I would like to...
1,770
Posted By Bloomy
Yes! Should have known that myself actually :o ...
Yes! Should have known that myself actually :o

Thanks for your patience :)
1,770
Posted By Bloomy
Right! I know that I got the path to the wav...
Right! I know that I got the path to the wav files wrong because it doesn't find ../wavs/audio

I am completely confused by my directory structure just now (sorry, I'm a newbie...)

Let's imagine...
1,770
Posted By Bloomy
Sorry, I'm feeling completely stupid now. I...
Sorry, I'm feeling completely stupid now.

I am in the lab directory, pasted the code into the terminal and the wav files didn't change...they have the same format and the number of ??? is correct....
1,770
Posted By Bloomy
Thanks! I now have the problem that my lab files...
Thanks! I now have the problem that my lab files and my wav files are in different directories.

When I'm in the lab directory, the wav files are in .. ./wavs/audio

I tried several things, but...
1,770
Posted By Bloomy
Compare and rename files
Hi.

I have a bunch of wav files and corresponding files that contain the transcription of these wav files.

The names of the transcription files have the format

chp_testfile_00001_0.lab...
Forum: Programming 06-24-2011
8,491
Posted By Bloomy
Python: Compare 2 word lists
Hi.

I am trying to write a Python programme that compares two different text files which both contain a list of words. Each word has its own line

worda
wordb
wordc

I want to compare...
1,892
Posted By Bloomy
I honestly have no clue what's going wrong here....
I honestly have no clue what's going wrong here. I'm not doing this for the first time, and the way I'm doing it has worked before.

When I run the command

perl -pe '$j=sprintf "%05d",++$i;s/\d+...
1,892
Posted By Bloomy
Unfortunately it didn't change anything.
Unfortunately it didn't change anything.
1,892
Posted By Bloomy
I was trying to use the same code for a similar...
I was trying to use the same code for a similar textfile, which doesn't have the double quotes, so:

( chp_testfile_0065 Blablabla. )
( chp_testfile_0003 Blablabla )
( chp_testfile_0123...
1,892
Posted By Bloomy
Thank you :-)
Thank you :-)
1,892
Posted By Bloomy
Thanks! How would I do this, if I don't want the...
Thanks! How would I do this, if I don't want the numeration to start from 1, but from e.g. 14000?
1,892
Posted By Bloomy
Insert ongoing numeration in each line?
Hi.

I have a text file with lines like this:

( chp_testfile_0065 "Blablabla." )
( chp_testfile_0003 "Blablabla" )
( chp_testfile_0123 "Blablabla" )

I need one more 0 in each line, so that...
1,438
Posted By Bloomy
Thanks a lot! I will try those out :-)
Thanks a lot! I will try those out :-)
Showing results 1 to 25 of 32

 
All times are GMT -4. The time now is 11:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy