![](/uploads/1/2/6/3/126346649/262883570.jpg)
2018/07/09 15:45Sometimes, we want to block the users downloading the executable files from Internet and avoid get trouble in virus and trojans.Please enable the 'Forbidden URL' function and enter '.exe', '.msi' and so on.If you want to block some other types of file like '.avi', '.rmvb', '.swf' you can also use this function (Figure 1).Figure 1For more details, please refer to.In new version of CCProxy build 20180709 and above, we have added function to select a text file for the 'Forbidden URL'. This comes in handy, if you have many extensions you want to filter/block.Here is how its done.Before, following the steps below create a forbidden url text file with the required extensions in a list (Figure 2).Figure 21. Click on the '.' Button next to the Forbidden URL text field (Figure 3)Figure 32. Then choose the file that has the filter list and the click 'OK' button (Figure 4).Figure 43. Now, the filter list will show in the Forbidden URL text field, click 'OK' button to save the changes.
(Figure 5).Figure 54. After this, you need to stop and start CCProxy once for the forbidden list to take effect.Note: Some links do not actually have the specified extensions, thus wont be able to be blocked. Example:File link with extension:Actual link:Thus link like this will not be able to be filtered.Related.
DOWNLOAD CODE FILE Sep 06, 2019 CCProxy also allows to ignore. Use an externally defined whitelist or blacklist provided as a simple text file with a site. Companies often use centralized proxy servers to control Internet traffic, block. The genuine ccProxy.exe file is a software component of Norton Internet. Use an externally defined whitelist or blacklist provided as a simple text file with a site.
How would you write a Bash script that can process a text file one line at a time. First you need a syntax and approach to read the file line by line. The methods for this approach are shown in this tutorial.Suppose, you have a file named company.txt which contents the company names. This file contains the following content.
Example -1: Reading file content from command line
Suppose, you want to read the file, company.txt, line by line from the command line without ‘cat’ command. Run the following command to do the task. while loop will read each line from the file company.txt in each step and store the content of the line in $line variable which will be printed later.
Example -2: Reading file content using script
Create a bash file and add the following code to read the content of a particular file. Here, an existing filename is stored in $filename variable and $n variable is used to keep the value of the line number of that file. Like previous example, while loop is used to read this file with line number.
#!/bin/bash
filename='company.txt'
n=1
whileread line; do
# reading each line
echo'Line No. $n : $line'
n=$((n+1))
done<$filename
filename='company.txt'
n=1
whileread line; do
# reading each line
echo'Line No. $n : $line'
n=$((n+1))
done<$filename
Run the following command to execute the script.
Run ‘cat’ command with company.txt file to display the original content of company.txt file.
Example -3: Passing filename from the command line and reading the file
Create a bash file and add the following script. This script will take the filename from the command line argument. First argument value is read by the variable $1 which will contain the filename for reading. If the file exists in the current location then while loop will read the file line by line like previous example and print the file content.
![Blacklist Text File For Ccproxy Blacklist Text File For Ccproxy](/uploads/1/2/6/3/126346649/255292541.jpg)
#!/bin/bash
filename=$1
whileread line; do
# reading each line
echo$line
done<$filename
filename=$1
whileread line; do
# reading each line
echo$line
done<$filename
Run the above script with employee.txt file as argument value. The output will show the content of employee.txt file by removing extra space. You can show the original content of employee.txt file by using ‘cat’ command.
$ bash readfile2.txt employee.txt
$ cat employee.txt
$ cat employee.txt
Example – 4: Reading file by omitting backslash escape
If you want to read each line of a file by omitting backslash escape then you have to use ‘-r’ option with read command in while loop.
#!/bin/bash
whileread-r line; do
# Reading each line
echo$line
done< company2.txt
whileread-r line; do
# Reading each line
echo$line
done< company2.txt
![Blacklist Text File For Ccproxy Blacklist Text File For Ccproxy](/uploads/1/2/6/3/126346649/769705579.png)
Create a file named company2.txt with backslash and run the following command to execute the script. The output will show the file content without any backslash.
You will need to read the file for many programming purposes. For example, you can search or match any particular content easily from any file by reading each line separately. So, it is an essential task for any programming. Some simple examples of reading file in bash script are shown in this tutorial. These will help you to get the idea of reading file content line by line using while loop in bash script and apply in your script more efficiently.
![](/uploads/1/2/6/3/126346649/262883570.jpg)