Search found 589 matches

by azfar
Sat May 15, 2010 3:11 pm
Forum: Programming
Topic: find string script!
Replies: 7
Views: 7319

thanks Mudasir, your logic works (perhaps it reporting the matched strings not data) just tweaking it to match other requirements.
by azfar
Sat May 15, 2010 1:34 pm
Forum: Programming
Topic: find string script!
Replies: 7
Views: 7319

thanks everyone let me see them.
by azfar
Fri May 14, 2010 4:34 pm
Forum: Programming
Topic: find string script!
Replies: 7
Views: 7319

find string script!

I need to create a script which search in a multi-line file (plain text) for a list of words from another file and after matching the pattern put only the matching word (not the whole line) into a string or redirect to another file.

any idea which commands can do it?
by azfar
Sat Apr 03, 2010 10:54 am
Forum: Administration
Topic: log scrip
Replies: 10
Views: 4477

You have to pass your traffic from any thing that can inspect and log it.
by azfar
Fri Apr 02, 2010 12:29 pm
Forum: Administration
Topic: log scrip
Replies: 10
Views: 4477

then try iptables log but that would be pain in your a$$.
by azfar
Fri Mar 26, 2010 1:23 pm
Forum: Administration
Topic: Script abt Filesystem alert
Replies: 5
Views: 3005

dude the script just send an email alert (if the condition matched) whenever you run it, so you need to create an cron entry for any interval you want.
by azfar
Thu Mar 25, 2010 3:42 pm
Forum: Security
Topic: Securing USB Devices
Replies: 10
Views: 12279

I haven't tried it but it should work. Make a password protected group for usb users. add allowed users to them. change the permissions on /dev/usb* (whatever the naming convention you have) OR apply same thing but with a user, hence every time users have to switch to allowed users in order to acces...
by azfar
Thu Mar 25, 2010 2:49 pm
Forum: Administration
Topic: Script abt Filesystem alert
Replies: 5
Views: 3005

here you go

Code: Select all

email="root"
mbody=/tmp/body
subject="Disk Usage Warning"
usage=`df -h /dev/sda1 /dev/sda3 /dev/sdb /dev/sdc /dev/sdd | awk 'NR==1{next}{ if ($5 > 90) print $6 " is at " $5;}'`
if [ -n "$usage" ]; then
echo "$usage" > $mbody
mail -s "$subject" "$email" < $mbody
fi

by azfar
Tue Mar 23, 2010 11:08 am
Forum: Installation
Topic: Microsoft Office
Replies: 4
Views: 7450

you may look at
http://en.wikipedia.org/wiki/Wine_%28so ... plications

some of above can automate the installation process of office for you, but i suggest you to try openoffice first, its rock solid.
by azfar
Tue Mar 23, 2010 12:16 am
Forum: Administration
Topic: Script abt Filesystem alert
Replies: 5
Views: 3005

just forget it and tell us what is your requirement.
by azfar
Mon Mar 22, 2010 11:40 pm
Forum: Administration
Topic: Memory Calculation
Replies: 1
Views: 1731

try this.

Code: Select all

totalmem=`free | awk 'NR==2 {print $2}'`

usage=`ps aux | grep -v grep | grep oracle | awk '{ total += $4} END {print total}'`

res=`echo "$totalmem * $usage / 100 / 1024" | bc`
echo $res"Mb"
by azfar
Mon Mar 22, 2010 11:52 am
Forum: Programming
Topic: parsing a line.
Replies: 3
Views: 6008

Thanks Farrukh, I thought I had thanked you, any way meanwhile I have done it like below

Code: Select all

cat list.dat | cut -b 3-6,7-8,9-10,11-14,17-18,26-28 --output-delimiter='       ' | sort +5 -6 > data
by azfar
Sat Feb 27, 2010 10:51 pm
Forum: Administration
Topic: two issues
Replies: 0
Views: 1479

two issues

Today I installed fc12 and found that grub password is not working in it. any one else noticed it?

second what tool you guys are using to mount ext from windows 7. I tried ext2ifs and ext2fsd but both are crashing, even in compatibility mode.
by azfar
Mon Feb 08, 2010 1:12 pm
Forum: General
Topic: Message Taking Service.
Replies: 2
Views: 6551

thanks farrukh.
by azfar
Fri Jan 08, 2010 10:28 am
Forum: General
Topic: Message Taking Service.
Replies: 2
Views: 6551

Message Taking Service.

I am looking for a Karachi based call center which provide me message taking service, I tried a lot like google, pseb, pasha but their data is outdated. Where should I search, any good Pakistani yellow pages or some kind of directory or any personal reference.