これで私の出力にprintfが表示されます。

これで私の出力にprintfが表示されます。

暗号化オンこの問題もっと面白くなります。次のスクリプトで始まります。

while read CTFlist; do 

#next we need to create ctfs padded with zeros as a variable
ctfPadded=(printf ${ctflist}00000000)

#then call rc2 key as variable
rc2Key="TemporaryRC2Key1"

#next create a hex version of the rc2 key
hexRc2Key=$(printf "${rc2Key}"|xxd -p)

#next to create the encrypted ctf file using the hex rc2 key
ctfEnc= $(printf "${ctfPadded}" |xxd -r -p |openssl enc -rc2-cbc -nopad -K "${hexRc2Key}" -iv 0000000000000000 |xxd -plain|tr -d '\n')

#Now we call all our variables and output to a single file.
echo ${ctfPadded},${ctfEnc^^} >> output.csv

#calling end of file with the input file of ctflist.csv
done <CTFlist.csv

#have to change the output file to dos version or it wont open on a windows comp
unix2dos output.csv

Output.csvファイルリストの各行にprintfがあります。なぜ?何が間違っていますか?

ベストアンサー1

ここでは、コマンドの置き換えからドル記号を省略しています。

ctfPadded=(printf ${ctflist}00000000)

この行は次のようになります。

ctfPadded=$(printf ${ctflist}00000000)

おすすめ記事