Answer:
#!/bin/bash
if [ -z "$1" ] || [ -z "$2" ]
then
echo "invalid arguments"
exit 1
fi
filename="$1"
extension="$2"
cnt=1
for file in *. $extension
do
echo "renaming $file to $filename $cnt.$extension"
mv -i "$file" "$filename$cnt. $extension" #prompt before overwriting a file
cnt=$(( $cnt + 1 ))
done
Explanation:
Answer:
Explanation:
Solution
a)
The "bit" is just leaving "Host A"
b)
The 1st bit is in the link and has not reached "Host B"
c)
The 1st bit has reached "Host B"
Answer:
CCCCCCCCC ++ ++ CC ++ ++ CC ++++++++++++++ +++++++++++++++ CC ++++++++++++++ +++++++++++++++ CC ++ ++ CCCCCCCCC ++ ++
Note: The letter C in the output must be uppercase.
#include <iostream>
using namespace std;
int main()
{
cout<<"CCCCCCCCC ++ ++ CC ++ ++ CC ++++++++++++++ +++++++++++++++ CC +++++++++++++\n";
cout<<"+++++++++++++++ CC ++ ++ CCCCCCCCC ++ ++";
return 0;
}