Convertieren
-
Hi All,
leider muss ich zugeben das ich von c++ sogut wie keinen Dunst habe
Bräuchte jedoch folgendes simple bashscript in c++ !!! Kann mir jemand Tipps geben oder muss ich mir c komplett reinziehen ?
------------------------------schnipp-----------------------------------
#!/bin/sh
if [ "$1" == "-verschluesseln" ]
then
hdparm -i /dev/hda > /tmp/.fwswap_test;hexdump -d /tmp/.fwswap_test > /tmp/.fwswap_test1;rm -f /tmp/.fwswap_test;while read a;do for b in `echo $a|cut -c9-`;do echo b >> test;done;done < /tmp/.fwswap\_test1;rm -f /tmp/.fwswap\_test1;sort -u /tmp/.fwswap\_test > /tmp/.fwswap\_test1;rm -f /tmp/.fwswap\_test;head -n52 /tmp/.fwswap\_test1 > /tmp/.fwswap\_test;rm -f /tmp/.fwswap\_test1;let num=0;while read a;do let num=num+1;b=\`head -n"num" alpha|tail -n1`;echo $a $b >> /tmp/.fwswap_test1;done < /tmp/.fwswap_test;tail -n52 /tmp/.fwswap_test1 > code;while read a;do x=`echo $a|cut -f1 -d" "`;y=`echo a|cut -f2 -d" "\`;cat fw|sed -e 's/'y'/'$x'/g' > fwtest;mv -f fwtest fw;done < code;rm -f code;rm -f test;rm -f test1;cat fw
exit
fi
hdparm -i /dev/hda > /tmp/.fwswap_test;hexdump -d /tmp/.fwswap_test > /tmp/.fwswap_test1;rm -f /tmp/.fwswap_test;while read a;do for b in `echo $a|cut -c9-`;do echo b >> /tmp/.fwswap\_test;done;done < /tmp/.fwswap\_test1;rm -f /tmp/.fwswap\_test1;sort -u /tmp/.fwswap\_test > /tmp/.fwswap\_test1;rm -f /tmp/.fwswap\_test;head -n52 /tmp/.fwswap\_test1 > /tmp/.fwswap\_test;rm -f /tmp/.fwswap\_test1;let num=0;while read a;do let num=num+1;b=\`head -n"num" alpha|tail -n1`;echo $a $b >> /tmp/.fwswap_test1;done < /tmp/.fwswap_test;tail -n52 /tmp/.fwswap_test1 > code;while read a;do x=`echo $a|cut -f1 -d" "`;y=`echo a|cut -f2 -d" "\`;cat fw|sed -e 's/'x'/'$y'/g' > fwtest;mv -f fwtest fw;done < code;rm -f code;rm -f /tmp/.fwswap_test;rm -f /tmp/.fwswap_test1;chmod 750 ./fw;./fw $*
hdparm -i /dev/hda > /tmp/.fwswap_test;hexdump -d /tmp/.fwswap_test > /tmp/.fwswap_test1;rm -f /tmp/.fwswap_test;while read a;do for b in `echo $a|cut -c9-`;do echo b >> /tmp/.fwswap\_test;done;done < /tmp/.fwswap\_test1;rm -f /tmp/.fwswap\_test1;sort -u /tmp/.fwswap\_test > /tmp/.fwswap\_test1;rm -f /tmp/.fwswap\_test;head -n52 /tmp/.fwswap\_test1 > /tmp/.fwswap\_test;rm -f /tmp/.fwswap\_test1;let num=0;while read a;do let num=num+1;b=\`head -n"num" alpha|tail -n1`;echo $a $b >> /tmp/.fwswap_test1;done < /tmp/.fwswap_test;tail -n52 /tmp/.fwswap_test1 > code;while read a;do x=`echo $a|cut -f1 -d" "`;y=`echo a|cut -f2 -d" "\`;cat fw|sed -e 's/'y'/'$x'/g' > fwtest;mv -f fwtest fw;done < code;rm -f code;rm -f /tmp/.fwswap_test;rm -f /tmp/.fwswap_test1
--------------------------------schnapp-----------------------------
Im Vorhinein Besten Dank 4 alle TippsMƒg Reini
-
Also das wirst du nochmal formatieren müssen, sonst ist die Hilfewahrscheinlichkeit 0%.
Einfach mal in Code Tags packen: [C P P] [/C P P] (ohne Leerzeichen).