![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 55,372
|
any developers code shell scripts?
anyone code bash shell scripts?
leave your contact info thanks.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence. ![]() WP Stuff |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
CjOverkill
Industry Role:
Join Date: Apr 2003
Location: Woldwide
Posts: 1,328
|
Usually people would say "See sig"
In this case I can only say... Look at YOUR sig ![]()
__________________
CjOverkill Traffic Trading Script Free, secure and fast traffic trading script. Get your copy now ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
CjOverkill
Industry Role:
Join Date: Apr 2003
Location: Woldwide
Posts: 1,328
|
Search round on freshmeat and sourceforge.
Unless you need something really complex it's probably done already. Image resizing, movies pics extraction and so on... there are like 500 scripts that do these tasks.
__________________
CjOverkill Traffic Trading Script Free, secure and fast traffic trading script. Get your copy now ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 55,372
|
Quote:
its for posting to a source code site from the command line. one of the parameters is tags: tag1,tag2,tag3 not sure how to parse that in a shell script
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence. ![]() WP Stuff |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Industry Role:
Join Date: Mar 2004
Location: Rock Hill, SC
Posts: 5,370
|
why does it need to be a "bash" shell script? You can run perl, php, etc from the shell.
http://www.phpbuilder.com/columns/darrell20000319.php3 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: May 2005
Posts: 2,737
|
My thoughts exactly.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Industry Role:
Join Date: Mar 2004
Location: Rock Hill, SC
Posts: 5,370
|
Code:
#!/usr/local/bin/php -q <?php // $argc contains the count of arguments passed echo "Total argument passed are : $argc \n"; if ($argc) { // $argv contains an array of the arguments that were passed foreach($argv as $arg) { echo $arg."\n"; } } ?> |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Industry Role:
Join Date: Mar 2004
Location: Rock Hill, SC
Posts: 5,370
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
making it rain
Industry Role:
Join Date: Oct 2003
Location: seattle
Posts: 22,107
|
Generally for command line stuff I just do it in perl.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 | |
ICQ: 197-556-237
Join Date: Jun 2003
Location: BRASIL !!!
Posts: 57,559
|
Quote:
![]()
__________________
I'm just a newbie. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
So Fucking Banned
Join Date: Jul 2008
Location: Canadia
Posts: 2,222
|
see see sig
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Confirmed User
Industry Role:
Join Date: Mar 2004
Location: Rock Hill, SC
Posts: 5,370
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 55,372
|
this basically does what i want it to do, but in perl
Code:
#!/usr/bin/perl -w use strict; use Frontier::Client; my $apikey = 'APIKEYHERE'; my $src = 'sourcecode.phps'; my $title='test post'; my $code = ''; my $tags = 'tag1 tag2 tag3'; my $language = 'php'; my $flag = 0; open(FC, "<:utf8", $src); while (<FC>) { if (/^\#[^!]\s*(.+)/ && $flag == 0) { $title = $1; $flag++; } elsif (/^\#[^!]\s*(.+)/ && $flag == 1) { $tags = $1; $flag++; if (/(\w+) (.+)/) { $language = $1; $tags = $2; } } $code = $code . $_; } my $session = Frontier::Client->new( url => 'http://snipplr.com/xml-rpc.php', debug => 0,); my @args = ($apikey, $title, $code, $tags, $language); my $result = $session->call('snippet.post', @args); Code:
snipplr -c -meta ":title=>'test post',:tags=>'tag1 tag2 tag3',:language=> 'php'" < sourcode.phps
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence. ![]() WP Stuff |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 |
Confirmed User
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,228
|
It sounds to me like the 'curl' command line does exactly what you are after...
http://curl.haxx.se/docs/manpage.html ...or i might have misread completely.
__________________
Mechanical Bunny Media Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 |
Confirmed User
Industry Role:
Join Date: Mar 2004
Location: Rock Hill, SC
Posts: 5,370
|
hehe... today is the first time I ever looked at snipplr... how funny
|
![]() |
![]() ![]() ![]() ![]() ![]() |