You can try creating a script and then you positional parameters with the script
my_script.sh <file with the codes to be change > <new file with codes start with upp. case>
Assuming your codes in you file is like this:
/**
* function to do abc
* and xzy
*
* @param ... etc.
/**
* function to do abc
* and xzy
*
* @param ... etc.
/**
* function to do abc
* and xzy
*
* @param ... etc.
/**
* function to do abc
* and xzy
*
* @param ... etc.
create the file my_script and add the codes below inside this file
#!/bin/bash
###remove any existing file that will have the new codes starting with upper case chars ###
rm -f "$2" 2> /dev/null
##let us set up a while loop that will read the original file that starts with L-case letters####
clue=""
while read -r line; do
if [ "$clue" != "" ]; then
lower_word=`echo "$line"|tr -s [:space:] ' ' |cut -d ' ' -f2`
upper_word=`echo "$line"|tr -s [:space:] ' ' |cut -d ' ' -f2|sed -e "s/\b\(.\)/\u\1/g"`
new_sentence=`echo "$line"|sed "s/$lower_word/$upper_word/g"`
echo "$new_sentence" >> $2
else
echo "$line" >> $2
fi
if [ "$line" = "/**" ]; then
clue="/**"
else
clue=""
fi
done < $1
Now run script..your output file should have:
/**
* Function to do abc
* and xzy
*
* @param ... etc.
/**
* Function to do abc
* and xzy
*
* @param ... etc.
/**
* Function to do abc
* and xzy
*
* @param ... etc.
/**
* Function to do abc
* and xzy
*
I apologize for deleting my answer the first time, since I misunderstood your question from the first inception.My apologies I am not a big fan of indentation in bash like I am in python :)