Forum: Posting Games Feb 7th, 2007 |
| Replies: 7,595 Views: 662,612 |
Forum: Posting Games Feb 7th, 2007 |
| Replies: 7,595 Views: 662,612 |
Forum: Posting Games Feb 6th, 2007 |
| Replies: 7,595 Views: 662,612 |
Forum: Perl Oct 3rd, 2006 |
| Replies: 6 Views: 59,091 Or:
$string =~ s/^\s*(\S*(?:\s+\S+)*)\s*$/$1/; |
Forum: Perl Sep 29th, 2006 |
| Replies: 11 Views: 4,715 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 rumour has it that there is nothing perl can't do ;) |
Forum: Perl Sep 12th, 2006 |
| Replies: 2 Views: 2,068 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 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 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 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 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 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 tar -cvf - $(find . -name "*.h") | (cd ../dest ; tar -xvf -) |
Forum: Shell Scripting Sep 11th, 2006 |
| Replies: 2 Views: 7,239 if [[ $2 != *.kext* ]] ; then
...
fi |
Forum: Shell Scripting Sep 11th, 2006 |
| Replies: 20 Views: 34,185 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 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... |