Article 58Q59 shell script to take input from user , a list of directory path into file and enter each directory make changes to file

shell script to take input from user , a list of directory path into file and enter each directory make changes to file

by
sandeep.c
from LinuxQuestions.org on (#58Q59)
Requirement---URGENT for production server----------please check for my syntaxes if possible-------------

echo path

cat >> path.txt

/app/tomcat7/webapps/sessionchecking.class ----- directory paths may increase in size or number ------
/app1/tomcat1/webapps1/Home.jsp
/app2/tomcat2/webapps2/struts.xml

ctrl-d

cat path.txt | while read line
do
pathvariable="$line"

base=$(basename ($pathvariable))
dir=$(dirname ($pathvariable))
echo $base
echo $dir

cd "$dir" -------------need to clear the contents of dir after processing -----------
mv $base /Contexts/backup
scp 10.3.x.x:/root/Downloads/sessionchecking.class .
donelatest?d=yIl2AUoC8zA latest?i=febVJNAcMSM:noM4BbRALuU:F7zBnMy latest?i=febVJNAcMSM:noM4BbRALuU:V_sGLiP latest?d=qj6IDK7rITs latest?i=febVJNAcMSM:noM4BbRALuU:gIN9vFwfebVJNAcMSM
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments