Search Results

Search: Posts Made By: Corona688
56
Posted By Corona688
Run like: ksh script.sh...
Run like:
ksh script.sh /path/to/filename12345.txt

Inside:
#!/bin/ksh

# $1 = filename12345.txt
set -- $(echo "$1" | tr -cd '0-9')
# $1 is now 12345

# rest of program
56
Posted By Corona688
ksh scriptname $(cat filename)
ksh scriptname $(cat filename)
Forum: Shell Programming and Scripting 6 Hours Ago
154
Posted By Corona688
To repeat: It's not a setting, it's hardcoded. ...
To repeat: It's not a setting, it's hardcoded. Changing it won't change programs. You'd just make it lie.

It might be possible to build a custom ksh with a higher setting but that sounds far...
Forum: Shell Programming and Scripting 6 Hours Ago
154
Posted By Corona688
I've verified that it's not cheating in my case...
I've verified that it's not cheating in my case by having the script print an extra character. The count would be out several more if ksh were being run repeatedly.
Forum: Shell Programming and Scripting 9 Hours Ago
154
Posted By Corona688
It's a hardcoded limit, not something trivially...
It's a hardcoded limit, not something trivially changed. Even if you coerce getconf into changing, it won't be reflected in programs. But I suspect you're using a crusty old pdksh/ksh88, newer ksh...
144
Posted By Corona688
Sorry, my morning coffee hadn't kicked in. ...
Sorry, my morning coffee hadn't kicked in.

Your chroot commands get things ready for a chroot, but don't actually run chroot, so nothing ends up happening inside the chroot.

If you call chroot...
88
Posted By Corona688
This is a rather roundabout way of sending files!...
This is a rather roundabout way of sending files! sshpass executing sshpass executing scp. Isn't there a better way?

Anyway, this doesn't do what you think. Each ID only gets used once. The...
144
Posted By Corona688
I've never heard of chrootbeg, google's never...
I've never heard of chrootbeg, google's never heard of chrootbeg, and my system doesn't have it. I think you took someone's instructions a little too literally. Those are labels for you, telling...
Forum: Shell Programming and Scripting 10 Hours Ago
92
Posted By Corona688
Password systems are designed to stop you from...
Password systems are designed to stop you from doing what you're attempting to do. They do not accept input from a program, just a terminal. To get around this, you will need to use an insecure...
704
Posted By Corona688
To be clear: We cannot pull a rabbit out of our...
To be clear: We cannot pull a rabbit out of our hat and give you perfect code. You've given us too many unknowns and change everything we give you far too much. What I am trying to do is show you...
704
Posted By Corona688
That you see nothing at all in the browser, not...
That you see nothing at all in the browser, not even errors hints that your program isn't running -- you're only seeing files left by previous attempts.
215
Posted By Corona688
whatever command ; status="$?"
whatever command ; status="$?"
Forum: Programming 5 Days Ago
382
Posted By Corona688
Thanks. That statement looks redundant (it's...
Thanks. That statement looks redundant (it's never going to be run as not main) so maybe try this:

#pdf_merger.py

import glob
from PyPDF2 import PdfFileMerger

def merger(output_path,...
120
Posted By Corona688
There's not a standard, "compatible" way, but...
There's not a standard, "compatible" way, but there's often a way to get it:

$ cat dot1.sh

#!/bin/bash
# dot1.sh

echo "$0 1=$1 2=$2 file=$file"

set | grep dot1

. ./dot2.sh a b

$...
Forum: Programming 1 Week Ago
382
Posted By Corona688
In what way does it not run? It will be far...
In what way does it not run?

It will be far easier to modify something that works than something that doesn't. Python programs are 1% python and 99% plugins, so you may need to install a plugin...
704
Posted By Corona688
Couple of things. How do you know that...
Couple of things.

How do you know that /tmp/$ZZ.txt isn't being created? You're deleting it!

If you're not getting error messages in your browser, sed is running. So I'd check that $ZZ is...
Forum: Programming 1 Week Ago
382
Posted By Corona688
In what way does it not work for your needs?
In what way does it not work for your needs?
704
Posted By Corona688
I have no way of knowing if your sed expression...
I have no way of knowing if your sed expression will do what you want or not! Show the input you have and the output you want.

You also haven't told me what $XX, $YY, or $ZZ are supposed to be,...
704
Posted By Corona688
The same as before, except you must write files...
The same as before, except you must write files inside /tmp/ instead of the current directory.
450
Posted By Corona688
I do not know expect well, but I know enough to...
I do not know expect well, but I know enough to warn you that it's not a shell. It can't (directly) run shell code. It is tcl if I remember right.
704
Posted By Corona688
You missed the point. set and case is a...
You missed the point. set and case is a replacement for XX=`echo "$QUERY_STRING" | sed -n 's/^.*val_x=\([^&]*\).*$/\1/p' | sed "s/%20/ /g"`

As for "no such file or directory", I'll hazard a wild...
324
Posted By Corona688
This is a repost of your other topic. How to...
This is a repost of your other topic.

How to convert my /bin/sh script with cgi and html to run it on browser!??...
380
Posted By Corona688
What have you tried?
What have you tried?
704
Posted By Corona688
Also, a quick and simple way to handle...
Also, a quick and simple way to handle QUERY_STRING in bash is:

OLDIFS="$IFS"
IFS="&=" # Split strings upon ampersand and equals
# If query_string="a=b&c=d, this sets $1=a, $2=b, $3=c, $4=d
set...
704
Posted By Corona688
One important thing to keep in mind with CGI. It...
One important thing to keep in mind with CGI. It doesn't run as you, it runs as the web server's user. Which means a CGI script doesn't -- AND SHOULDN'T! -- have permissions to write to the current...
Showing results 1 to 25 of 500

 

Featured Tech Videos

All times are GMT -4. The time now is 11:06 PM.
Unix & Linux Forums Content Copyright 1993-2019. All Rights Reserved.
Privacy Policy