- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
22 Posted Topics
Re: [code]tar -cvf - $(find . -name "*.h") | (cd ../dest ; tar -xvf -)[/code] | |
Re: Or: $string =~ s/^\s*(\S*(?:\s+\S+)*)\s*$/$1/; | |
Re: Set the variables as needed first, then: [code]( cat <<! From: $FROM Subject: $SUBJ To: $TO ! [ "$CC" ] && echo "Cc: $CC" echo cat $BODY ) | sendmail[/code] | |
Re: [quote=kamitsin;221061]I have attached the modified script beacuse the original script is for changing the password across multiple servers and i guess this is not what you require. You need to execute the script from root user. It will create a log file in the directory from which you are executing … | |
Re: If you want to indent you can use the indent option for inline files: [CODE]if [[ something ]] ; then ftp -n $HOST <<-END_SCRIPT ... ftp commands ... END_SCRIPT fi[/CODE] Note the dash before the introduction to the inline file. | |
Re: [CODE]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 [*]} - 2)) more values for $name" done[/CODE] | |
Re: After you have created a working copy with cpanel and overwritten it with your code, do [CODE]cat -v test.pl[/CODE] Then rename that file. [CODE]mv test.pl goodtest.pl[/CODE] Then upload so you get the 500 error and do the cat again. [CODE]cat -v test.pl[/CODE] Then diff them. [CODE]diff test.pl goodtest.pl[/CODE] And post … | |
Re: 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 editing then you might be wanting server-side scripting such as with … | |
Re: [quote=LindaF;251558]I don't know how I can execute an event of Javascript into a link in a program in Perl. This event of JavaScript have executed a function that return a HTML page. Anybody know how I can it? [/quote] It's not easy to understand what you are saying you want … | |
Re: 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 into the world of perl mods. If you don't need a GUI (it's there in a couple of … | |
Re: [CODE]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 = UNLIMITED ]] || [[ $limit -gt 3 ]] ; then echo "ERROR: $profile can attempt to login $limit times" fi done[/CODE] | |
Re: He did write: [quote]If you're using bash just "declare" opts as an array.[/quote] That is: [code]declare -a opts[/code] Notice the [code]#!/bin/ksh[/code] at the start of his code. | |
Re: 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 permission denied problem too. | |
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. I have written a perl script to do this but there is something missing. I think … | |
Re: I think you will probably have to classify the perl portion of the package. I don't know if adding [inlinecode]use Inline CPP;[/inlinecode] to the calling program would help. [URL]http://www.perl.com/doc/manual/html/pod/perltoot.html[/URL] | |
Re: rumour has it that there is nothing perl can't do ;) | |
Re: Nearly everything I know about perl re I got from [URL]http://perldoc.perl.org/perlretut.html[/URL] I will continue to go there as a reference because I am familiar with it but [URL]http://www.regular-expressions.info/tutorial.html[/URL] seems to be well organized and comprehensive. | |
Re: This would work better. [code]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[/code] But I think what you really want is to put the substitution commands in the wordlist like this: s-Word1-<a href=http://www.domain.com/Link1>Word1</a>-g s-Word1-<a href=http://www.domain.com/Link2>Word2</a>-g s-Word1-<a href=http://www.domain.com/Link3>Word3</a>-g And then: [code]sed -f wordlist.txt … | |
Re: 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 [*]} done The array elements are indexed from 0 … | |
Re: [CODE]sed ' /Line1/{ N;N;N;N s/^Line1\nLine2\nLine3\nLine4\nLine5$/Line1\ Line2\ INSERTLINE1\ Line3\ INSERTLINE2\ Line4\ Line5\ / }' rc.conf [/CODE] | |
Re: [code]if [[ $2 != *.kext* ]] ; then ... fi[/code] |
The End.