Search Results

Search: Posts Made By: ugurgazi
2,161
Posted By ugurgazi
Yes, still practicing, and making a script for...
Yes, still practicing, and making a script for the children.
So far thanks for your information. Together with the above script I have a second script. (see below)

What goes wrong is, when a...
2,161
Posted By ugurgazi
Almost! But this looks very well devrmike. ...
Almost!
But this looks very well devrmike.

What now happens is that I get the next while running the script:

~$ bash test1
1 * 1 =
1
test1: line 8: [1: command not found
Wrong!
...
2,161
Posted By ugurgazi
Yes what I see is the whole list. Thanks! That is...
Yes what I see is the whole list. Thanks! That is great.

How can we now change this, so that one question will be asked one by one.

It's like 3*3 = .... the question must be filled in. If...
2,161
Posted By ugurgazi
I have not done anything, I was experimenting on...
I have not done anything, I was experimenting on different scripts with:
- bc
- expr
- asking questions like:
trap
trap 'echo thanks for the math' EXIT
MATH=$((9))
echo '3*3='
while read -p...
2,161
Posted By ugurgazi
Doing simple math for children.
Hello!

I saw that there were a few differente ways to do math within bash scripts.

expr and bc are possibilities. But which one to use when?


I want to make an simple bash script for...
19,163
Posted By ugurgazi
So far so good..... ifconfig | grep...
So far so good.....


ifconfig | grep 'Bcast:' | cut -d: -f3 | awk '{print $1}'


with the above I can see by broadcast IP...
but how can I tell the script in the same line to ping the...
19,163
Posted By ugurgazi
Many thanks for this one... The above script...
Many thanks for this one...
The above script is working! I can ping from beginning to ending IP-adresses very fast!

Lets go to the second part... :)
When no beginning and ending IP is given,...
19,163
Posted By ugurgazi
What in the above script will change when it is...
What in the above script will change when it is 255.255.254.0?

And if I run the above script I get the next error:
unix1: line 7: ((: .100: syntax error: operand expected (error token is...
19,163
Posted By ugurgazi
Hmm.. the bash script is not working.. But this...
Hmm.. the bash script is not working..
But this one is usefull, thanks for that!
IP=192.168.1.5 SUBNET=${IP%.*} echo $SUBNET 192.168.1And now the second part: the below script will ping the given...
19,163
Posted By ugurgazi
I use the script below to see my own IP from bash...
I use the script below to see my own IP from bash script:
#!/bin/bash
ifconfig | grep 'inet addr:' | grep -v '127.0.0.1' |
cut -d: -f2 | awk '{ print $1 }'
It will show your IP. If my IP is...
19,163
Posted By ugurgazi
Bash script for ping in your own subnet
I have a question for one who wants to help me.

I want to create a bash script to ping IP-adresses. It must first ask me the beginnen IP, then the ending IP like: 192.168.100.1 - 192.168.100.255....
Showing results 1 to 11 of 11

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