Search Results

Search: Posts Made By: mirusnet
14,331
Posted By mirusnet
Combine two awk commands
Hi,
Can someone please guide me how to combine the following two awk calls in one?
I noticed that it is very often situation for me, and I think that it can be replaced with one awk call.
The...
3,165
Posted By mirusnet
This works very well: @ IN SOA ...
This works very well:
@ IN SOA dns.my.com. mirus.my.com. (

dns.my.com. IN A MY.I.P.ADDRESS
3,165
Posted By mirusnet
DNS Bind
Hello,
I have a question about dns file zone.

Every zone file begins like:

@ 86400 IN SOA ns1.website.com. admin@website.com. (


It means that name server ns1 is...
3,723
Posted By mirusnet
Perl fork
Hi, I want to exec three different functions in perl one per fork();
How can I determine that this it the third fork and I should use third function in it.

if ($pid = 0) { first();}
else (...
2,217
Posted By mirusnet
[ X`uname` = XFreeBSD ] && echo 1 || echo...
[ X`uname` = XFreeBSD ] && echo 1 || echo 2;
18,301
Posted By mirusnet
for i in `cat X`; do grep $i Y; done Will print...
for i in `cat X`; do grep $i Y; done
Will print all records from file X that exist in Y.
1,970
Posted By mirusnet
for i in `cat a`; do mv $i `echo $i | sed...
for i in `cat a`; do mv $i `echo $i | sed 's/~//'`; done
18,301
Posted By mirusnet
And what do you want to have in the output?
And what do you want to have in the output?
6,696
Posted By mirusnet
perl exact match
How to emulate grep -o option in perl.
I mean to print not all line, only the exact match.

echo "2A2 BB" | perl -ne 'print if /2A2/'
2A2 BB

I want to print only 2A2.
Forum: Programming 12-12-2008
1
if
2,020
Posted By mirusnet
if
How I can include one head file if this program compiles on freeBSD and other if on the Linux platform.

#include <some.h>

I know that very often it does configure script, but can I do it...
3,598
Posted By mirusnet
Where is the problem? Just add in second cron...
Where is the problem?
Just add in second cron script something like:

kill `ps auxww | grep 'your first cron task' | do some awk`
2,032
Posted By mirusnet
Where is the problem? su user -c 'some...
Where is the problem?


su user -c 'some operations;'

echo "EXIT";
2,194
Posted By mirusnet
something like: k=`sqlplus "select a,b from...
something like:

k=`sqlplus "select a,b from c"`
a=`echo ${k} | awk '{print $1;}'`
b=`echo ${k} | awk '{print $2;}'`
1
vim
1,939
Posted By mirusnet
vim
Does anyone know the fast way to go to tab/2 distance in vim.

I mean set four spaces.
5,648
Posted By mirusnet
root@FreeBSD >./a.sh It works! root@FreeBSD...
root@FreeBSD >./a.sh
It works!
root@FreeBSD >cat a.sh
#!/bin/sh

rvin_doxx_scrt()
{
printf "It works!\n"
}

rvin_doxx_scrt
5,648
Posted By mirusnet
if (som code) then rvin_doxx_scrt fi
if (som code)
then
rvin_doxx_scrt
fi
1,507
Posted By mirusnet
for i in `cat a`; do grep $i b >>c; done
for i in `cat a`; do grep $i b >>c; done
Forum: Programming 10-28-2008
4,878
Posted By mirusnet
fprintf
Could someone explain me the following fprintf format:

fprintf (stderr, _("Try `%s --help' for more information.\n"),
program_name);

Why just not use:

fprintf(stderr, "ry `%s...
2,646
Posted By mirusnet
There're no depends between mysqld and httpd. ...
There're no depends between mysqld and httpd.

Try to connect to the database using just a mysql client.
mysql -u user -h host -p
24,099
Posted By mirusnet
You can not do it using just sh.
You can not do it using just sh.
3,185
Posted By mirusnet
* * * * * /bin/ksh a_script_name.sh
* * * * * /bin/ksh a_script_name.sh
146,898
Posted By mirusnet
No. You can do: ./script >file...
No.

You can do:

./script >file 2>&1
6,302
Posted By mirusnet
The better way is to use syslog for that.
The better way is to use syslog for that.
17,920
Posted By mirusnet
Just an example.... a=`pwd` for in in `cat...
Just an example....

a=`pwd`
for in in `cat servers`;
do
mkdir some;
cd some && scp ...${i}.. &
cd ${pwd}
done
2,447
Posted By mirusnet
How about something like: for i in `cat...
How about something like:


for i in `cat file`
do
nslookup ${i} "format options here" >> file.another
done
Showing results 1 to 25 of 145

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