Thank you for your kind reply.
Sorry but I forgot to tell you that the bud code I want to remove from the php files is very long string. That's why I want that the bash file read the string to be replace from a file. I have done the following modification to your script but this doesn't remove the code from the files, could you please help me with this ? What do I have to change ?
Thank you in advance for your kind reply.
Last edited by rbatte1; 06-12-2018 at 08:04 AM..
Reason: Added CODE tags
Hi there,
I would like to write a script to automate the copy and renaming of files in multiple dir.
I have a generic file named s253e.prb and would like to copy this to multiple dir and rename it.
Example:
Dir is AL-M1 and the prb file name is AL-M1.prb. I would like to be able to... (6 Replies)
hi guys,
Suppose you have 100 files in a folder and you want to replace all occurances of a word say "ABCD" in those files with "DCBA", how would you do
it ???
jatin (13 Replies)
I used the following script
cd pathname
for y in `ls *`;
do sed "s/ABCD/DCBA/g" $y > temp; mv temp $y;
done
and it worked fine for finding and replacing strings with names etc. in all files of the given path.
I'm trying to replace a string which consists of path (location of file)
... (2 Replies)
I used the following script
cd pathname
for y in `ls *`;
do sed "s/ABCD/DCBA/g" $y > temp; mv temp $y;
done
and it worked fine for finding and replacing strings with names etc. in all files of the given path.
I'm trying to replace a string which consists of path (location of file)
... (11 Replies)
Hi
I use the following code to replace ‘.' with ‘N' in my files and keep both versions.
awk '{ gsub(/\./,"N"); print }' file_0001.txt > path/to/new/dir/file_0001.txt
I need help on how to apply the code to 100 files instead of doing them one file at a time. The files are labeled... (7 Replies)
Hi All,
Iam new to unix, I need to find string and replace it in the file name. Like
text_123_0.txt,text_123_1.txt,text_123_2.txt. I need to search 123 and replace it with 234 . Is there any unix command to replace them in single command since i have 5 directories. So i need to go each and every... (0 Replies)
Guys I have a big issue that I need to get fixed ASAP however I can not seem to find a way to do it. We started to use zones with Solaris 10 at work and we moved a zone from a SIT box to a DEV box. Problem is the software we have installed is looking at a /lcl/sit/apps/ path and it needs to look... (5 Replies)
Is there a reason why all of these examples of linux find and replace in multiple files use find and grep to pipe into sed or perl. Why not just use sed or perl directly with something like this?
sed -i 's/echo/burnbaby/g' booboo*... (2 Replies)
Hey guys. I know pratically 0 about Linux, so could anyone please give me instructions on how to accomplish this ?
The distro is RedHat 4.1.2 and i need to find and replace a multiple lines string in several php files across subdirectories.
So lets say im at root/dir1/dir2/ , when i execute... (12 Replies)
Hi,
I have php files in main dir and sub dir's as well.
I need to find "new mysqli('localhost', 'System', 'xxxxxx', 'System', '3306');"
and replace as "new mysqli('localhost', 'unx_sys', 'yyyy', 'unx_sys', '3306');"
I tried like:
sed 's/new mysqli\(*\)\;$/new... (1 Reply)
Discussion started by: ashokvpp
1 Replies
LEARN ABOUT DEBIAN
cccc
CCCC(1) General Commands Manual CCCC(1)NAME
cccc - C and C++ Code Counter, a software metrics tool
SYNOPSIS
cccc [options] file1.c ...
DESCRIPTION
CCCC analyses and reports measurements of source code in C, C++, and Java. It was developed to augment programmers' instinctive applica-
tion of numeric rules of thumb about what constitutes high or low quality products with an automated analysis tool.
CCCC processes the files listed on its command line. If the filenames include '-', read a list of files from standard input.
This program is work in progress and is not well documented. Please be prepared to refer to the source code for the meaning of some
options.
OPTIONS --help Generate this help message.
--outdir=dname
Directory for generated files (default=.cccc).
--html_outfile=fname
Name of primary HTML report generated (default=outdir/cccc.html).
--db_infile=fname
Preload internal database from named file (default=no initial content).
--db_outfile=fname
Save internal database to named file (default=outdir/cccc.db).
--opt_infile=fname
Load options from named file (default=use compiled-in option values, refer to cccc_opt.cc for option information).
--opt_outfile=fname
Save options to named file (default=outdir/cccc.opt).
--lang=string
Use language specified for files specified after this option. Languages supported are c, c++, ada, and java (default=use lan-
guage/extension mapping controlled by options).
--report_mask=hex
Control report content (refer to ccccmain.cc for mask values).
--debug_mask=hex
Control debug output content (refer to ccccmain.cc for mask values).
AUTHOR
CCCC was written by Tim Littlefair <tim_littlefair@hotmail.com>.
This manual page was written by Colin Watson <cjwatson@debian.org> for the Debian system (but may be used by others).
CCCC(1)