demaxfa je napisao/la:cim sam copy pastao i pokrenu ./ren izbacio mi je ovu grešku nakon toga sam probao zamjeniti " sa ' i ' sa " i urznim kombinacijam ali je svaki put javljao drug grešku
1. Imaš li #!/bin/bash na početku skripte?
2. Jesi li stavio +x (exec) ovlasti nad fajlom (chmod +x ren)?
Ja sam sad probao preko skripte i meni radi...
A neutron walks into a bar; he asks the bartender, 'How much for a beer?' The bartender looks at him, and says 'For you, no charge.'
Probaj dodati -print0 kod find-a i -0 kod prvog xargs-a... Iako ne znam hoće li ti to pomoći. Probaj također debugirati skriptu tako da je prvo pokreneš do prvog "|" (pajpa), pa onda do drugog.
A neutron walks into a bar; he asks the bartender, 'How much for a beer?' The bartender looks at him, and says 'For you, no charge.'
#!/bin/bash
# renames.sh
# basic file renamer
find . -type f -name "*.mhtml" -o -type f -name "*.mht" | xargs -I item sh -c '{ echo item; echo item | sed "s/[:?|]//g"; }' | xargs -n2 mv
nakonon ponovnog copy pastea javlja drugu grešku valjda nešto nisam dobro pastao.
./ren
xargs: unmatched jednostruki quote; by default quotes are special to xargs unless you use the -0 option
sh: 1: sh: 1: Temash.html.mht: not foundAMD’s: not found
sh: 1: sh: 1: AMD’s: not foundTemash.html.mht: not found
mv: missing file operand
Try `mv --help' for more information.
darko@debian:~/Web$
./ren > debug.txt
sh: 1: Linux: not found
sh: 1: Linux: not found
sh: 1: Linux: not found
sh: 1: Linux: not found
sh: 1: Linux: not found
sh: 1: Linux: not found
sh: 1: Linux: not found
sh: 1: Linux: not found
mv: target `«' is not a directory
mv: target `a' is not a directory
mv: target `Information' is not a directory
mv: sh: 1: Syntax error: "(" unexpected (expecting "}")
target `Technical' is not a directory
mv: target `on' is not a directory
mv: target `a' is not a directory
mv: target `reviews' is not a directory
mv: target `Ars' is not a directory
mv: target `history' is not a directory
mv: target `Ars' is not a directory
mv: target `5' is not a directory
mv: target `of' is not a directory
mv: target `Ars' is not a directory
mv: target `3' is not a directory
mv: target `history' is not a directory
mv: target `1' is not a directory
mv: target `part' is not a directory
mv: target `Amige/Shadow' is not a directory
mv: target `2' is not a directory
mv: target `an' is not a directory
mv: target `history' is not a directory
mv: target `Ars' is not a directory
mv: target `4' is not a directory
mv: target `of' is not a directory
mv: target `Technica.html.mht' is not a directory
mv: target `postlaunch' is not a directory
mv: target `the' is not a directory
mv: target `Technica.html.mht' is not a directory
mv: target `stopping' is not a directory
mv: target `Ars' is not a directory
mv: target `alive!' is not a directory
mv: target `Amige/A' is not a directory
mv: target `4' is not a directory
mv: target `part' is not a directory
sh: 1: Ars: not found
mv: sh: 1: Ars: not found
target `history' is not a directory
mv: target `Ars' is not a directory
mv: target `4' is not a directory
mv: target `of' is not a directory
mv: sh: 1: Ars: not found
target `./Razno/Povijest' is not a directory
sh: 1: Ars: not found
mv: target `1' is not a directory
mv: target `part' is not a directory
mv: target `Amige/A' is not a directory
mv: target `prototype' is not a directory
mv: target `AmigaOS' is not a directory
mv: target `reviews' is not a directory
mv: target `of' is not a directory
mv: target `Technica.html.mht' is not a directory
mv: target `Enter' is not a directory
mv: target `the' is not a directory
mv: target `Technica.html.mht' is not a directory
mv: target `stopping' is not a directory
mv: target `of' is not a directory
mv: target `3' is not a directory
mv: target `part' is not a directory
mv: target `./Razno/Povijest' is not a directory
mv: target `birth' is not a directory
mv: target `of' is not a directory
mv: target `1' is not a directory
mv: target `part' is not a directory
mv: target `of' is not a directory
mv: target `./Razno/Povijest' is not a directory
mv: target `retrospective' is not a directory
mv: target `Beast' is not a directory
mv: target `Amige/A' is not a directory
mv: target `bleeding' is not a directory
mv: target `Amiga,' is not a directory
mv: target `./Razno/Povijest' is not a directory
mv: target `Technica.html.mht' is not a directory
mv: target `Ars' is not a directory
mv: target `Amiga' is not a directory
mv: target `the' is not a directory
mv: target `Technica.html.mht' is not a directory
mv: target `Game' is not a directory
mv: target `the' is not a directory
mv: target `./Razno/Povijest' is not a directory
mv: target `on!' is not a directory
mv: target `Amiga,' is not a directory
mv: target `Amige/It’s' is not a directory
mv: target `./Razno/Povijest' is not a directory
mv: target `Technica.html.mht' is not a directory
mv: target `Genesis' is not a directory
mv: target `Amiga,' is not a directory
mv: target `history' is not a directory
mv: target `3' is not a directory
mv: target `part' is not a directory
mv: target `Amige/A' is not a directory
mv: target `scene' is not a directory
mv: target `Amiga,' is not a directory
mv: target `./Razno/Povijest' is not a directory
mv: target `retrospective' is not a directory
mv: target `Beast' is not a directory
mv: target `Amige/A' is not a directory
mv: target `3' is not a directory
mv: target `part' is not a directory
mv: target `history' is not a directory
mv: target `4' is not a directory
mv: target `part' is not a directory
mv: target `Amige/A' is not a directory
mv: target `4' is not a directory
mv: target `part' is not a directory
mv: target `history' is not a directory
mv: target `Ars' is not a directory
mv: target `7' is not a directory
mv: target `Ars' is not a directory
mv: target `alive!' is not a directory
mv: target `Amige/A' is not a directory
mv: target `Ars' is not a directory
mv: target `1' is not a directory
mv: target `Everything' is not a directory
mv: target `Place' is not a directory
mv: target `Medium.html.mht' is not a directory
darko@debian:~/WebReaper$