Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: mirusnet
5,257
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...
2,617
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
2,617
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,415
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 (...
1,687
Posted By mirusnet
[ X`uname` = XFreeBSD ] && echo 1 || echo...
[ X`uname` = XFreeBSD ] && echo 1 || echo 2;
14,190
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,633
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
14,190
Posted By mirusnet
And what do you want to have in the output?
And what do you want to have in the output?
5,716
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
1,809
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,216
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`
1,655
Posted By mirusnet
Where is the problem? su user -c 'some...
Where is the problem?


su user -c 'some operations;'

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

I mean set four spaces.
5,024
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,024
Posted By mirusnet
if (som code) then rvin_doxx_scrt fi
if (som code)
then
rvin_doxx_scrt
fi
1,227
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,405
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,211
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
16,962
Posted By mirusnet
You can not do it using just sh.
You can not do it using just sh.
2,819
Posted By mirusnet
* * * * * /bin/ksh a_script_name.sh
* * * * * /bin/ksh a_script_name.sh
125,783
Posted By mirusnet
No. You can do: ./script >file...
No.

You can do:

./script >file 2>&1
4,449
Posted By mirusnet
The better way is to use syslog for that.
The better way is to use syslog for that.
16,660
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
1,930
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

 

Featured Tech Videos

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