Search Results

Search: Posts Made By: kkkk
2,721
Posted By kkkk
super thank you.
super thank you.
2,721
Posted By kkkk
awk -F. 'NR==1 {pre=$1"."$2; a=$3; d=$4} NR==2...
awk -F. 'NR==1 {pre=$1"."$2; a=$3; d=$4} NR==2 {b=$3; c=$4} END {for(i=a;i<=b;i++) for(j=d;j<=c;j++) print pre"."i"."j}' input_file

works great if the input file is like

192.168.0.1...
2,721
Posted By kkkk
ip range addresses
I am trying to find a script that will generate all the ip addresses in particular range.

Example: start: 41.0.0.0 end ip 41.1.1.2

32.32.35.3 to 32.32.36.0


Please help.

Thanks
1,411
Posted By kkkk
thanks...the python example works but the bash...
thanks...the python example works but the bash one.
1,411
Posted By kkkk
command help
Just wonder if there is a command that prints out letters from a to z in alphabetical order.

Thanks
1,332
Posted By kkkk
variable help
here is my code:

sql=`mysql Live -e "select * from name where name='test' \G"`

echo $sql


test: line 3: syntax error near unexpected token `sql=`mysql Live -e "select * from name where...
3,241
Posted By kkkk
sorry for the confusing... awk...
sorry for the confusing...

awk 'FNR==NR{a[$0]++; next} !a[$0]' current.uid user.uid

is what I wanted..

Thanks for your help.
3,241
Posted By kkkk
it prints out the output of user.uid..which is...
it prints out the output of user.uid..which is not what I wanted.

Thanks btw
3,241
Posted By kkkk
loop help
Hi there,

I have 2 files:

current.uid

5516
5517
5518
5519
5520
5521
5522
5523
5524
5525

user.uid

5506
4,689
Posted By kkkk
there is nothing wrong with it. It's just that I...
there is nothing wrong with it. It's just that I wanted to try to use loop to get this done.

Here is what I tried:

v=$(echo "1 2 3 4")
t=$(echo "a b c d")

test=$(for x in $v
do
for y...
4,689
Posted By kkkk
can it be done without writing files to the...
can it be done without writing files to the system?

Thanks
4,689
Posted By kkkk
Thanks cfajohnson. Your suggestions work fine...
Thanks cfajohnson. Your suggestions work fine but I am still having issue:

basically where is what I have

v=$(echo "1 2 3 4")
t=$(echo "a b c d")

I'd like to print out

1/a
2/b
3/c...
4,689
Posted By kkkk
variable issues
Hope someone can help me.

I have 2 outputs

1 2 3 4 5

a b c d e

basically, I'd like to loop thru these outputs and print out the results below

1/a
2/b
3/c
4/d
5/e

Thanks,
52,975
Posted By kkkk
ifconfig -a eth0 | grep "inet addr"| awk '{print...
ifconfig -a eth0 | grep "inet addr"| awk '{print $2}' | sed 's/addr://'

that would work fine for regular linux server.
1,949
Posted By kkkk
The hostname is actually the last octet of the...
The hostname is actually the last octet of the ip. I ended up creating a separate hostname file and was able to get the final result with Sergiu-IT's script.
1,949
Posted By kkkk
Thanks for the script. It works great...
Thanks for the script. It works great...
1,949
Posted By kkkk
loop issue
I have 2 files one of them has all the all mac addresses and the other one has all the ip addresses. Basically, I want to loop thru those 2 files and generate a configuration like below:

host...
Showing results 1 to 17 of 17

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