sorting a file
Romualdo
micyaro at pf.pl
Thu Dec 5 11:08:16 EST 2002
More information about the Python-list mailing list
Thu Dec 5 11:08:16 EST 2002
- Previous message (by thread): sorting a file
- Next message (by thread): sorting a file
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello, I am trying to rewrite a little shell script into python. I ve got a text file with following content: foo bar file_name1.ext ./foobar foo bar file_name2.ext ./foobar ... .. . Now the shell script reads only the "file_nameXX.ext"-part and using it as a variable, the script moves the file "file_nameXX.ext" from a directory to another directory given. It looks like this: source_dir = /foo/bar dest_dir = /another/foo/bar sourcefile = "source_dir" + "/" + "file_name" destfile = "dest_dir" + "/" + "file_name" PROGRAM = move sourcefile destfile Does anybody could tell me how the lines above would look like in python? Thank you for helping me out. Best regards, Michel
- Previous message (by thread): sorting a file
- Next message (by thread): sorting a file
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list