Search Results

Search: Posts Made By: ravi san
7,272
Posted By ravi san
create shell script to extract unique information from one file to a new file
Dear Mr 47,

Please try this simple code for retrieving unique information.


gzip -d http.log.20110808.gz ;cut -d " " -f9 http.log.20110808 |uniq > http.log.20110808_updated
2,438
Posted By ravi san
Hi, You can try to edit in crontab ( adding...
Hi,

You can try to edit in crontab ( adding path to the crontab)

Code:

Example--->

crontab -e
*/1 * * * * /home/rsankar/Ravi/scripting/test.sh

Save--> :wq!

crontab: installing...
2,438
Posted By ravi san
Hi Zaxxon, You can modify this line and try...
Hi Zaxxon,

You can modify this line and try it works fine.

In the if loop whatever the grep pattern you are using it should within `(backticks) which is an intepreter for command execution...
3,985
Posted By ravi san
Hi You can try this code for finding large...
Hi

You can try this code for finding large number of files in a directory.


for page in `find scripting |grep -e 'xml$'`;
do
cat $page | sed -e 's/<.*>//g' $page>$page.txt_3;
done
...
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 09:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy