Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gibt's ein Pendant zum DOS copy Kommando?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
kiezpro
Tux's lil' helper
Tux's lil' helper


Joined: 13 May 2004
Posts: 126
Location: Yes

PostPosted: Sun Jul 04, 2004 7:11 pm    Post subject: Gibt's ein Pendant zum DOS copy Kommando? Reply with quote

cp hab ich auch schon mal benutzt, danke :-)
Ich suche ein Tool, das Folgendes kann:

Code:
copy s?ript.txt my*.*


(würde sich script.txt, skript.txt und sxript.txt nehmen und nach myscript.txt, myskript.txt und mysxript.txt kopieren). mcopy kann das nicht, und mcp hat eine andere Syntax. Kennt jemand ein Tool oder vielleicht ein schickes Perl-Script, das sowas mit der gleichen Syntax kann? Mir ist klar, daß man zumindest wohl copy "s?ript.txt" "my*.*" schreiben müßte. Und ich bin kein DOS-Fetischist, aber ich könnte jemandem mit so einem Tool einen großen Gefallen tun.
Back to top
View user's profile Send private message
UncleOwen
Veteran
Veteran


Joined: 27 Feb 2003
Posts: 1493
Location: Germany, Hamburg

PostPosted: Sun Jul 04, 2004 7:19 pm    Post subject: Reply with quote

for i in s?ript.txt ; do cp $i my$i ; done
Back to top
View user's profile Send private message
tuxmin
l33t
l33t


Joined: 24 Apr 2004
Posts: 838
Location: Heidelberg

PostPosted: Sun Jul 04, 2004 7:27 pm    Post subject: Reply with quote

mmv "s?ript.txt" "mys#1ript.txt"
_________________
ALT-F4
Back to top
View user's profile Send private message
kiezpro
Tux's lil' helper
Tux's lil' helper


Joined: 13 May 2004
Posts: 126
Location: Yes

PostPosted: Sun Jul 04, 2004 7:28 pm    Post subject: Reply with quote

Schon klar, aber ich suche ein Tool, das die gleiche Syntax hat (und hab schon erwähnt, daß mmv/mcp nicht in Frage kommt)... der Typ, der mich gefragt hat (mein Informatikprofessor) ist halt etwas auf DOS hängengeblieben und ist nicht so firm mit normalen Shell-Wildcards.
Back to top
View user's profile Send private message
tuxmin
l33t
l33t


Joined: 24 Apr 2004
Posts: 838
Location: Heidelberg

PostPosted: Sun Jul 04, 2004 7:30 pm    Post subject: Reply with quote

Oeh... muss natuerlich mcp heissen in dem Fall :wink:
_________________
ALT-F4
Back to top
View user's profile Send private message
Ragin
l33t
l33t


Joined: 14 Apr 2003
Posts: 776

PostPosted: Sun Jul 04, 2004 8:27 pm    Post subject: Reply with quote

Pack alles in ein Bash Script rein und gib deinem Bekannten das :)
_________________
"Innerhalb der Computergemeinschaft lebt man nach der Grundregel, die Gegenwart sei ein Programmfehler, der in der nächsten Ausgabe behoben sein wird."

Clifford Stoll, amerik. Astrophysiker u. Computer- Pionier
Back to top
View user's profile Send private message
kiezpro
Tux's lil' helper
Tux's lil' helper


Joined: 13 May 2004
Posts: 126
Location: Yes

PostPosted: Sun Jul 04, 2004 8:33 pm    Post subject: Reply with quote

Ich hab auch dran gedacht, aber hoffte, umhinzukommen... hilft wohl aber nix. Falls ich das tatsächlich tun muß, werd ich's hier für die Nachwelt veröffentlichen.
Back to top
View user's profile Send private message
primat
Guru
Guru


Joined: 12 Jan 2004
Posts: 437
Location: Berlin

PostPosted: Sun Jul 04, 2004 10:04 pm    Post subject: Reply with quote

Das ist doch ein Zweizeiler für die spezielle Aufgabe!
Gruss
Back to top
View user's profile Send private message
kiezpro
Tux's lil' helper
Tux's lil' helper


Joined: 13 May 2004
Posts: 126
Location: Yes

PostPosted: Sun Jul 04, 2004 10:18 pm    Post subject: Reply with quote

Klar, soll aber natürlich universell verwendbar sein und möglichst alle (Un-)Arten von copy nachbilden... sieht mir eher nach einem Perl-Script aus, und ich bin kein sonderlicher Perler.
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9538
Location: beyond the rim

PostPosted: Sun Jul 04, 2004 11:24 pm    Post subject: Reply with quote

Gleiche Syntax ist problematisch, weil ? und * schon von der Shell erweitert werden, also beim Programm idR gar nicht ankommen. Zumindest mit Quotes wirst du dich wohl abfinden müssen.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum