Search Results

Search: Posts Made By: mirusnet
14,417
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,233
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,233
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,730
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,236
Posted By mirusnet
[ X`uname` = XFreeBSD ] && echo 1 || echo...
[ X`uname` = XFreeBSD ] && echo 1 || echo 2;
18,377
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,999
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,377
Posted By mirusnet
And what do you want to have in the output?
And what do you want to have in the output?
6,721
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,024
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,611
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,054
Posted By mirusnet
Where is the problem? su user -c 'some...
Where is the problem?


su user -c 'some operations;'

echo "EXIT";
2,207
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,980
Posted By mirusnet
vim
Does anyone know the fast way to go to tab/2 distance in vim.

I mean set four spaces.
5,698
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,698
Posted By mirusnet
if (som code) then rvin_doxx_scrt fi
if (som code)
then
rvin_doxx_scrt
fi
1,528
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,903
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,686
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,181
Posted By mirusnet
You can not do it using just sh.
You can not do it using just sh.
3,197
Posted By mirusnet
* * * * * /bin/ksh a_script_name.sh
* * * * * /bin/ksh a_script_name.sh
147,081
Posted By mirusnet
No. You can do: ./script >file...
No.

You can do:

./script >file 2>&1
6,367
Posted By mirusnet
The better way is to use syslog for that.
The better way is to use syslog for that.
17,949
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,489
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:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy