Search Results

Search: Posts Made By: phpfreak
14,073
Posted By phpfreak
expect 'missing close-brace' error
my expect script fails when it tries to send a password that I have that uses {}'s. Hoping I can correct that. It doesn't complain about the %, #, *, /, ? or ~ characters only the {}'s.
...
22,679
Posted By phpfreak
shell script/telnet - Remove/Control "Connection closed by foreign host"
How do I gain control of the "Connection closed by foreign host" message telnet yields when you connect to it in a shell script? I'm using the output:
#!/usr/local/bin/bash

count=$(ping -c 1 $1 |...
3,387
Posted By phpfreak
thanks i'll try that. Also wondering if fstat -p...
thanks i'll try that. Also wondering if fstat -p will reveal the inum for it also.
3,387
Posted By phpfreak
Find file that maps to a listening port
On my VPS server I have a port that is open and is listening for a 'status' command when you connect to it to like so...

$ telnet host 1900
Trying host...
Connected to host.
Escape character is...
5,781
Posted By phpfreak
This is what i've got so far.. #!/bin/sh ...
This is what i've got so far..

#!/bin/sh

case "$1" in
start)
while : ; do
./pager.sh &&
sleep 30
./pager99.sh &&

if [ -f...
5,781
Posted By phpfreak
It would be something similar to a initd startup...
It would be something similar to a initd startup script.. :o

#!/bin/sh

case "$1" in
start)
#Not entirely sure of how I would loop this sequence w/o cron
#Also, on...
5,781
Posted By phpfreak
Need help making a start/stop script...
i have two separate scripts that work nicely to curl and generate two files.. one html and one txt so a total of four.

When the script starts up i want it to:
call and run shellscripta
call and...
12,206
Posted By phpfreak
How do i tell my bash shell script to test the output of a command against something
How do i tell my bash shell script to test the output of the command i'm using?? I want this script to look for lines not equal to 1 then let me know..


$ cat blah ; echo ---- ; cat blah.sh
1 fe...
2,815
Posted By phpfreak
^^what are we working with?
^^what are we working with?
2,087
Posted By phpfreak
As i've always understood alias is used to...
As i've always understood alias is used to shorten commands and their arguments (which may include files), but not for the purpose of renaming files. You can rename the file but i would not advise of...
Forum: What is on Your Mind? 10-16-2009
1,725
Posted By phpfreak
You know your on the brink of loosing it when.....
you spend an entire day with scripting nightmares and go to bed real late in the early morning hrs to wake up to your gf asking you a question and your only answer is "It's in the script" LMAO
...
5,686
Posted By phpfreak
hehe thanks pludi, newbie error :o www didn't...
hehe thanks pludi, newbie error :o www didn't have the proper permissions.. but let me ask this.. the holy trinity i found quite useful. I fixed the variable declaration it complained about with...
5,686
Posted By phpfreak
yea i know what you mean about perl and it not...
yea i know what you mean about perl and it not complaining but i guess that's the reason for the rant. perl doesn't care about my 'critical' step in the code. but i'm not lazy, i'll figure it out...
5,686
Posted By phpfreak
Perl script 'system' linking to local shell script not working
Trying to figure out why this works:

printpwd.pl
#!/usr/bin/perl
use CGI::Carp qw( fatalsToBrowser );
print "Content-type: text/html\n\n";


$A = system("pwd");
$A = `pwd`;
print "$A\n";
...
4,225
Posted By phpfreak
hehe, i couldn't agree with more. thanks again
hehe, i couldn't agree with more. thanks again
4,225
Posted By phpfreak
scottn that works nicely, despite the fact that i...
scottn that works nicely, despite the fact that i have to generate 3 files it checks out and gets the job done... now i'm sure there is a way either through sed or awk to do all of the work in memory...
4,225
Posted By phpfreak
whoops looks like i made a mistake on my example...
whoops looks like i made a mistake on my example output.. just drop those ip's down one level.

scottn thanks for the quick response.. only one problem.. i think yours assumes the server prefix...
4,225
Posted By phpfreak
using sed to write horizontally & sequentially in a file
Hey there

I have two commands to get exactly the data i want but.. i want to write them into a file side by side and in the same order so that they always match. So what i'm hoping to learn from...
14,391
Posted By phpfreak
syntax error: unexpected end of file
I have a script that's failing

./zzmaster.sh: line 2: syntax error: unexpected end of file

There are 4 scripts total involved. The first 'znocc0.sh' essentially curls a page then does some sed...
7,232
Posted By phpfreak
Speed: sed vs awk
I'm just curious to know what you would prefer to use in a script to make changes in files. In general is sed quicker than awk? or is it the other way around?
5,489
Posted By phpfreak
dd, sorry I didn't get back sooner but I just...
dd, sorry I didn't get back sooner but I just wanted to let you know that the script worked like a charm. Thanks again.
5,489
Posted By phpfreak
Tried but it didn't work. Assuming the below were...
Tried but it didn't work. Assuming the below were in a file by itself, if I can get sed to empty it out then I -should be ok.


<TD ALIGN=CENTER>
<A HREF=addcomment.pl?type=li&serv_ip=1.30.33.2...
5,489
Posted By phpfreak
Script doesn't err but the sed isn't clearing the...
Script doesn't err but the sed isn't clearing the cells. I found when I ran it manually on the file..


# cp status.html teststatus.html
# OUT=`cat teststatus.html` && echo $OUT |sed...
5,489
Posted By phpfreak
k, I have a few issues/questions at this point....
k, I have a few issues/questions at this point. When I run my script it errs:

[: !=: unexpected operator
[: !=: unexpected operator


Seems that part of ddreggors code is breaking during the...
5,489
Posted By phpfreak
Ok I think I follow and I'm going to combine with...
Ok I think I follow and I'm going to combine with my sed script to test. Please review it below as I've made some revisions. Remember, my goal is to remove everything between the table data tags and...
Showing results 1 to 25 of 48

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