Search Results

Showing results 1 to 30 of 30
Search took 0.01 seconds.
Search: Posts Made By: sut
Forum: Posting Games Feb 7th, 2007
Replies: 7,595
Views: 662,612
Posted By sut
spring --> showers
Forum: Posting Games Feb 7th, 2007
Replies: 7,595
Views: 662,612
Posted By sut
pollen --> seeds
Forum: Posting Games Feb 6th, 2007
Replies: 7,595
Views: 662,612
Posted By sut
Forum: Perl Oct 3rd, 2006
Replies: 6
Views: 59,091
Posted By sut
Or:

$string =~ s/^\s*(\S*(?:\s+\S+)*)\s*$/$1/;
Forum: Perl Sep 29th, 2006
Replies: 11
Views: 4,715
Posted By sut
Sorry, I got in a big hurry to leave yesterday and got careless.


What I wanted to write was:
#!/usr/bin/perl

print "Content-type: text/html\n\n";
print "<META HTTP-EQUIV=\"Refresh\"...
Forum: Perl Sep 28th, 2006
Replies: 11
Views: 4,715
Posted By sut
I would seriously recommend losing the "no javascript" rule. Then you could do a nice controlled, visually acceptible refresh.

Otherwise, non-parsed header scripting is the way to go.

Just...
Forum: Perl Sep 18th, 2006
Replies: 3
Views: 1,466
Posted By sut
All that puckdropper said.

Plus short time to implementation.

I was happy with Korn Shell and sed, having abandonded awk for that combination long before.

Then I began needing IPC and got...
Forum: Shell Scripting Sep 15th, 2006
Replies: 2
Views: 1,804
Posted By sut
echo "
set head off
select profile,limit from dba_profiles
where resource_name = 'FAILED_LOGIN_ATTEMPTS';
" |sqlplus -S username/password |
while read profile limit ; do
if [[ $limit =...
Forum: Shell Scripting Sep 15th, 2006
Replies: 6
Views: 5,840
Posted By sut
By the way, I wouldn't bother with awk.
#!/bin/ksh
set -A opts $(sed -n 's/^ *paper_size *= *\(.*\)$/\1/p' optsfile)
for opt in ${opts
} ; do
echo $opt
done Notice: I like to be able to...
Forum: Shell Scripting Sep 15th, 2006
Replies: 6
Views: 5,840
Posted By sut
He did write:

That is:
declare -a opts
Notice the
#!/bin/ksh at the start of his code.
Forum: Shell Scripting Sep 13th, 2006
Replies: 2
Views: 1,978
Posted By sut
You've deleted a couple of lines before posting. The error is on line 8, not 11. Take the space out from between SAG and the equal sign in the environment variable assignment. That should solve the...
Forum: Shell Scripting Sep 13th, 2006
Replies: 20
Views: 34,185
Posted By sut
Hi. It works now. The attached script works on SYS V type terminals and was tested on AIX 5.3. I will eventually get it working on Sun and Linux and will need to work out the Berkly style TTYs which...
Forum: Perl Sep 13th, 2006
Replies: 2
Views: 3,178
Posted By sut
Hi. It works now. If you're interested, it's here: http://www.daniweb.com/techtalkforums/post251917.html#post251917
Forum: Perl Sep 13th, 2006
Replies: 1
Views: 1,640
Posted By sut
I think you will probably have to classify the perl portion of the package. I don't know if adding
use Inline CPP;
to the calling program would help.
...
Forum: Shell Scripting Sep 12th, 2006
Replies: 7
Views: 9,880
Posted By sut
If you want to indent you can use the indent option for inline files:

if [[ something ]] ; then
ftp -n $HOST <<-END_SCRIPT
...
ftp commands
...
END_SCRIPT
fi
Forum: Perl Sep 12th, 2006
Replies: 3
Views: 3,973
Posted By sut
It's not easy to understand what you are saying you want to do.

It looks like you are having problems with the quote characters.
Change "linkFTecnica(nref2)" to 'linkFTecnica(nref2)'. Your perl...
Forum: Perl Sep 12th, 2006
Replies: 2
Views: 3,178
Posted By sut
I want to script the use of passwd. Since it accesses the controlling tty directly, I cannot do this with standard IO redirection.

I may not install additional perl modules nor the expect utility....
Forum: Perl Sep 12th, 2006
Replies: 11
Views: 4,715
Posted By sut
Are you saying you don't want to grab any output, you only want to execute the CGI?
For that you could put the URL in a button.

If you want to dynamically change a part of the page without...
Forum: Perl Sep 12th, 2006
Replies: 13
Views: 9,351
Posted By sut
After you have created a working copy with cpanel and overwritten it with your code, do
cat -v test.pl
Then rename that file.
mv test.pl goodtest.pl
Then upload so you get the 500 error and do...
Forum: Perl Sep 12th, 2006
Replies: 6
Views: 3,579
Posted By sut
rumour has it that there is nothing perl can't do ;)
Forum: Perl Sep 12th, 2006
Replies: 2
Views: 2,068
Posted By sut
Nearly everything I know about perl re I got from http://perldoc.perl.org/perlretut.html

I will continue to go there as a reference because I am familiar with it but...
Forum: Shell Scripting Sep 11th, 2006
Replies: 1
Views: 2,858
Posted By sut
This would work better.

cat wordlist.txt | tr -d '\r' | while read i ; do
sed "s-$i-<a href=http://www.domain.com>$i</a>-g" article.txt
done
But I think what you really want is to put the...
Forum: Shell Scripting Sep 11th, 2006
Replies: 3
Views: 21,591
Posted By sut
echo "fdxE1ConfigAdminStatus int 1 2" |
while read name type values ; do
set -A valarray $(echo $values)
echo $name $type ${valarray[0]} ${valarray[1]}
echo "There are $((${#valarray...
Forum: Shell Scripting Sep 11th, 2006
Replies: 2
Views: 6,565
Posted By sut
I would do this in Korn Shell. I haven't tested it on bash but it should do the same. It is POSIX shell syntax.

while read line ; do
set -A attr $(echo $line | tr ':' ' ')
echo ${attr
...
Forum: Shell Scripting Sep 11th, 2006
Replies: 5
Views: 6,394
Posted By sut
Set the variables as needed first, then:

(
cat <<!
From: $FROM
Subject: $SUBJ
To: $TO
!

[ "$CC" ] && echo "Cc: $CC"
Forum: Shell Scripting Sep 11th, 2006
Replies: 3
Views: 10,185
Posted By sut
sed '
/Line1/{
N;N;N;N
s/^Line1\nLine2\nLine3\nLine4\nLine5$/Line1\
Line2\
INSERTLINE1\
Line3\
INSERTLINE2\
Line4\
Line5\
Forum: Shell Scripting Sep 11th, 2006
Replies: 9
Views: 7,007
Posted By sut
tar -cvf - $(find . -name "*.h") | (cd ../dest ; tar -xvf -)
Forum: Shell Scripting Sep 11th, 2006
Replies: 2
Views: 7,239
Posted By sut
if [[ $2 != *.kext* ]] ; then
...
fi
Forum: Shell Scripting Sep 11th, 2006
Replies: 20
Views: 34,185
Posted By sut
Hi. This is what I've put together so far. Can somebody tell me what I am doing wrong? I've searched the web and read the manuals but I just can't see how to get the communication with passwd to go...
Forum: Shell Scripting Sep 6th, 2006
Replies: 20
Views: 34,185
Posted By sut
Hello Amit,

I am trying to get a perl script to communicate with the passwd program. I do not have access to the modules expect or IO::Pty. I also do not have access to the expect utility.

So...
Showing results 1 to 30 of 30

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC