Search Results

Search: Posts Made By: aspect_p
34,418
Posted By aspect_p
I think my script is done.
If anyone is looking for the source code, I used this for a suse install, but it can be modified to accommodate any Linux distro.


#!/bin/sh
ipaddr=$(/usr/sbin/traceroute -m1 10.0.100.1 |grep...
34,418
Posted By aspect_p
so i got the command to work on a single line,...
so i got the command to work on a single line, syntax error.

What i want to do now is trim the last three digits of the ip..

I have 192.168.1.1 i'm trying to achieve 192.168.1
34,418
Posted By aspect_p
i am using this in the script traceroute -m1...
i am using this in the script
traceroute -m1 ipaddr |grep 10.12 |awk '{ print $3}'| tr -d '(' | tr -d ')' | read ipaddr

echo $ipaddr

the only problem now is that it wont run as a single...
7,380
Posted By aspect_p
Try...
Scp $file $servername:$path
ssh $servername 'cd $path, tar -xzf $filename'
34,418
Posted By aspect_p
Shell script to read file into variable
the script i am trying to write will allow my server to give itself an ip address.

So far i am up to the following but i'm stuck.

tracert -m 1 > traceroute.txt

[Outputs]
1 routername...
3,926
Posted By aspect_p
Can you go a little further in describing the awk...
Can you go a little further in describing the awk methods used on the script, im sorry to be a bother but something like this can be a HUGE ace in my arsenal of shell scripting.
3,926
Posted By aspect_p
Shell script getting input from output
I have a program that can be run in terminal, when its run it either returns SSH OK or CRITICAL, how do i use the output in my script?

good
./check_sh myserver
SSH OK

bad
./check_sh myserver...
3,816
Posted By aspect_p
I looked over my code and i had serveral...
I looked over my code and i had serveral instances where there was a ] directly after a numerical value. thanks for pointing that out, and yes this script was an early one with serveral errors. Got...
3,312
Posted By aspect_p
say something like this? #!/bin/sh ...
say something like this?

#!/bin/sh
pattern= word|word|word|word(Put your pattern here or read it from a file)

while :
do

case $pattern in

$pattern) rm -rf $1
*) echo...
34,969
Posted By aspect_p
ok, for one you dont need all those quotes in the...
ok, for one you dont need all those quotes in the if statement. and i do believe your elsif is supposed to be spelled elif.. maybe that will help?
3,816
Posted By aspect_p
simple count script outputting mass errors
script outputting [: 100: missing ] cant find anything wrong with the script either... :[


#!/bin/sh
#count execution script

time=0

while [ $time -le 1000 ]
do



if [ $time -le 100...
6,230
Posted By aspect_p
!!
after all the hours of looking through my code... :eek: thanks for the heads up! YOU ROCK!!
6,230
Posted By aspect_p
expr not outputting properly.. bsd sh script
When i run sh -x test.sh, expr outputs x=expr $x + 1 instead of doing the arithmetic.. been working on this overnight.. and its being a pain in the arse if you ask me.. :confused::confused:...
Showing results 1 to 13 of 13

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