안녕하세요 c 전문가 ... 다음 셸 스크립트 코드를 c로 변환하려고합니다. 내가 c에서 다시 코딩하도록 도와주세요. 사전에 감사합니다 ..쉘 스크립트 코드를 C로 변환합니다
#count1:
#! /bin/sh
# count1 appends an increment to a file 100 times
# note that a file called numbers must be initialised to contain 0
count=0
while [ $count -lt 100 ] # loop 100 times
do
count=`expr $count + 1` # increment counter
n=`tail -1 numbers` # get last line from numbers file
expr $n + 1 >> numbers # add 1 to it and append it back
done
코드를 작성 하시겠습니까? 그건 덜 "도움이", 더 "할"아니야? – Borealid