LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Closed Thread
  Search this Thread
Old 08-15-2020, 06:28 AM   #16
Fred27377
Member
 
Registered: Jun 2020
Posts: 68

Original Poster
Rep: Reputation: Disabled

while(i < 1000){
a = Perl -pe //zyphf.i.com/
a >> list1
Next i

}
c=1
open $list1
while ($c in $list < 1000){
touch $c > final directory
next c
}

Under a page.
Look out Facebook!
 
Old 08-15-2020, 08:13 AM   #17
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,222

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Just realized I'd edited this out of my last post...

Does this have any resemblance to what you're looking for?

[SOLVED] Creating a stable url for a service

Last edited by dugan; 08-15-2020 at 08:58 AM.
 
1 members found this post helpful.
Old 08-15-2020, 09:03 AM   #18
Fred27377
Member
 
Registered: Jun 2020
Posts: 68

Original Poster
Rep: Reputation: Disabled
#!/usr/bin/perl -d
#use strict;

my $list = 0;
my $i = 1;
my $a = 0;
while (my $i < 10) {
"(perl -pe //zyphf.$i.com/)" >> list1;
cat $i;
}

my $c = 1;
open FH,list1;
while (my $c in list1 < 10) {
touch $c > dir1
}
close list1;
 
Old 08-15-2020, 10:28 AM   #19
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by Fred27377 View Post
Code:
#!/usr/bin/perl -d
#use strict;

my $list = 0;
my $i = 1;
my $a = 0;
while (my $i < 10) {
"(perl -pe //zyphf.$i.com/)" >> list1;
cat $i;
}

my $c = 1;
open FH,list1;
while (my $c in list1 < 10) {
	touch $c > dir1
}
close list1;
Since asking you for details didn't work, asking you to post code in CODE tags likely won't either..but please do so.

You *STILL* don't say what you're trying to accomplish...you have written a VERY small perl script to touch a file, and that perl script isn't too robust. Want to do a redirect? Here you go:
Code:
#!/usr/bin/perl -Tw
use CGI;
$query = new CGI;
print $query->redirect('http://website.url/');
There's a redirect for you. However, if all you're wanting to do is basic hosting...you do realize there are entire software suites dedicated to templating websites as they're built, right?? Including the blank pages, redirects, etc.
Quote:
Originally Posted by Fred27377
Look out Facebook!
I don't think they have much to worry about.
 
1 members found this post helpful.
Old 08-15-2020, 02:15 PM   #20
Fred27377
Member
 
Registered: Jun 2020
Posts: 68

Original Poster
Rep: Reputation: Disabled
TBOne . I don’t know what I am trying to accomplish. I came up with an idea four or five days ago and posted my idea. I took until today for me to figure it out. I’ve always been like that running on intuition. Not smarts but a hunch. I guess my goal is to have a site with 1000 pages.
 
Old 08-15-2020, 02:17 PM   #21
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,307
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
Actually it is not yet clear what your idea is. Can you please describe what your goal is at a high level --- without mentioning ANY specific method or technology? That would help a lot. Otherwise the posts just are confusing, at best.
 
1 members found this post helpful.
Old 08-15-2020, 03:05 PM   #22
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,222

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Quote:
Originally Posted by Fred27377 View Post
I hired a programmer from Fiverr.
Quote:
Originally Posted by Fred27377 View Post
TBOne . I don’t know what I am trying to accomplish. I came up with an idea four or five days ago and posted my idea. I took until today for me to figure it out. I’ve always been like that running on intuition. Not smarts but a hunch. I guess my goal is to have a site with 1000 pages.
I'm speechless...
 
2 members found this post helpful.
Old 08-15-2020, 06:43 PM   #23
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by Fred27377 View Post
TBOne . I don’t know what I am trying to accomplish.
Then what, exactly, do you think anyone is going to be able to tell you??
Quote:
I came up with an idea four or five days ago and posted my idea. I took until today for me to figure it out. I’ve always been like that running on intuition. Not smarts but a hunch. I guess my goal is to have a site with 1000 pages.
So you want to have a standard, generic web server. Unless you have ANY CLEAR IDEAS on what you need/want to do, there is zero anyone can do to help you. There is no 'intuition' or 'a hunch'; unless you have a goal, you've got nothing to work towards and consequentially, no idea WHAT you need to do.
Quote:
Originally Posted by dugan
I'm speechless...
Given this and the OP's other threads, I'm not surprised in any way.
 
1 members found this post helpful.
Old 08-16-2020, 03:29 AM   #24
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Fred27377 View Post
I don’t know what I am trying to accomplish. I came up with an idea four or five days ago and posted my idea. I took until today for me to figure it out. I’ve always been like that running on intuition. Not smarts but a hunch. I guess my goal is to have a site with 1000 pages.
You're probably starting to realise it by now: you're seriously pissing off some people with your request - people who take your problem seriously and honestly try to help you. This is a slap in their faces, a complete dismissal of their efforts.

What you wrote there should have been part of your very first post.

Instead, it is post #21, after you have been asked in almost every post to specify your requirement.
Each time, you should have answered "I have NO requirement at all, I'm just doing it for fun" - and that would have been totally OK.

There is so much wrong with this behaviour, I can't even...
Please, don't ever do this again.
I can see you have an inquisitive mind in all things coding, which is good and valued here on LQ, but don't ever try to make others jump on your whim again.
 
2 members found this post helpful.
Old 08-16-2020, 05:58 AM   #25
Fred27377
Member
 
Registered: Jun 2020
Posts: 68

Original Poster
Rep: Reputation: Disabled
Since asking you for details didn't work, asking you to post code in CODE tags likely won't either..but please do so.

What are code tags?
 
Old 08-16-2020, 06:09 AM   #26
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,307
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
The forum interface has a lot of buttons that will put markup tags into your post. One button puts [code] [/code] tags there, or you can type them manually instead. Then put your script, program, or data between the tags and it will be much easier to read as the spacing and indents will be preserved and a monospace typeface will be (depending on your browser) be used.

So if you have the following in your post,

[code]
#!/bin/sh

echo "Hello, World!"

exit 0
[/code]

Then it will look like this,

Code:
 
#!/bin/sh

echo "Hello, World!"

exit 0
and it will then be easier for people to work with.
 
Old 08-16-2020, 08:48 AM   #27
Fred27377
Member
 
Registered: Jun 2020
Posts: 68

Original Poster
Rep: Reputation: Disabled
Cool!
 
Old 08-16-2020, 09:38 AM   #28
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by Fred27377 View Post
Since asking you for details didn't work, asking you to post code in CODE tags likely won't either..but please do so.

What are code tags?
Seriously??? Out of all the questions asked of you, THIS is what you respond to?? Since you're so 'intuitive', it's odd that you've never looked at ANY of the buttons on the posting editor window at the top of what you're typing.
 
Old 08-17-2020, 07:41 AM   #29
Fred27377
Member
 
Registered: Jun 2020
Posts: 68

Original Poster
Rep: Reputation: Disabled
I was way off-. Here is what a Contractor provided for me after I gave him my code!
It’s in Bash. I’m dining on crow.

Code:
#!/bin/sh

PREF=$1
COUNT=$2

if [[ "$PREF" == "" ]]; then
        echo "empty file prefix!"
        exit 0
fi

if [[ "$COUNT" == "" ]]; then
        echo "max count not specified!"
        exit 0
fi

for i in $(seq 1 $COUNT)
do
        echo "${PREF}.${i}.com"
        touch "${PREF}.${i}.com"
done

exit 0
 
Old 08-17-2020, 07:48 AM   #30
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,307
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
It is in POSIX shell, of which Bash is a superset.

However, it is really close but is missing some essential changes to prevent it from providing backdoors to the system. If this is being served to the public over HTTP or HTTPS it would be very important to validate the input data to make sure it is what it needs to be and not something sneaky instead. As it stands, someone could feed $1 something malevolent to cause trouble with the touch or echo lines.
 
  


Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
redirect non www site to www site with 301 status mitter1989 Linux - Server 1 08-02-2014 07:53 AM
How to capture web site incoming traffic and redirect to different IP/server superkikim Linux - Server 5 11-08-2012 11:04 AM
call perl script through another perl script with arguments nanda22 Linux - Newbie 21 07-21-2009 12:18 AM
[HELP] redirect traffic to spesific port based on Traffic Content using iptables summersgone Linux - Server 2 06-22-2009 11:26 AM
Including methods from a perl script into another perl script gene_gEnie Programming 3 01-31-2002 05:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration