Posts: 33
Threads: 14
Joined: Sep 2012
This one goes out to my dwaine junkies, currently pulling my hair.
Here is the current code im workin on, but it isn't working.
#!|necho registered=$arg0|nassignment=$arg1|naccess=11|n^/mnt/term/spoof|n^/home/usrcahoy0/SPOOF
Here is the rundown
#!
#its an executable, the idea is a script within a script to super easily make mulitple identities with mulitple jobs for spoofing other terminals and such
echo
#it echoes because when the player uses the script, it calls another script
registered=$arg0
assignment=$arg1
access=11
^/mnt/term/spoof
#this is the end of the [inner] script, upon running spoof x y, you will get an identity with those credentials sent to your terminal
^
/home/usrcahoy0/spoof
#this is the end of the [outer] script, which saves itself into my folder
What am I doing wrong?
Can you not make script functions within script functions?
Am I just boning the code?
I know the idea is sorta shitty at the moment, but hopefully this could open the door to cooler ideas and much intricate dwaine code.
Posts: 699
Threads: 155
Joined: Sep 2013
The first ^ at the end of the inner script will be taken as the end of the script as a whole. However, a | by itself will be interpreted as a ^ later..
Posts: 1,246
Threads: 15
Joined: Oct 2012
Yes, you'll have to realize that there are major differences between lines of code entered directly into a command line and lines of code in a script.
Posts: 33
Threads: 14
Joined: Sep 2012
So...
echo #!|necho registered=$arg0|nassignment=$arg1|naccess=11 | /mnt/term/spoof|n^/home/usrcahoy0/SPOOFED
would work? Because it returns "Break at line 3"
@Marquesas: I was under the impression that the script was, at least for the shitty things I learned in a basic compsci class, just a streamlined approach at the commandlne. When we were working with python you could in theory solve the problems presented to you at the command line, it would just take fucking forever and be monotonous as all hell, and you'd need to keep notes. In this context, where is my confusion? Am I going about solving this conundrum from the wrong angle?
Posts: 1,246
Threads: 15
Joined: Oct 2012
Chips Ahoy Wrote:@Marquesas: I was under the impression that the script was, at least for the shitty things I learned in a basic compsci class, just a streamlined approach at the commandlne. When we were working with python you could in theory solve the problems presented to you at the command line, it would just take fucking forever and be monotonous as all hell, and you'd need to keep notes. In this context, where is my confusion? Am I going about solving this conundrum from the wrong angle?
Your confusion is
non-existent, it is the way every interpreter ever works.
Except this one.
I'd much rather check out what you're doing in-game, because your first post confuses me.
Posts: 11
Threads: 1
Joined: Jun 2014
Is DWAINE specified anywhe-- BAHAHAHAHAHAHA
Posts: 225
Threads: 3
Joined: Oct 2012
this makes bash look fun to script
Posts: 141
Threads: 46
Joined: Dec 2013
Quote:>ls /mnt/radio
]Contents of /mnt/radio
]1459
>cat quotest
]#!
]echo $arg0 ^ /mnt/radio/$arg1/foo
]
>quotest butts 1459
]Unable to pipe stream to file.
Any idea what I'm doing wrong here?
Posts: 1,246
Threads: 15
Joined: Oct 2012
rulib Wrote:Any idea what I'm doing wrong here?
Likely to be a limitation imposed on the system. Code seems mostly fine. Also, try replacing that ^ (how the hell did you manage to echo a "^" to a file???) with a |.
Posts: 1,283
Threads: 91
Joined: Sep 2013
It might be doing something like not replacing $arg2. And I thnk you can get a ^ by using ^^ (or something equally weird)
Posts: 1,246
Threads: 15
Joined: Oct 2012
Further testing shows that apparently varnames are not parsed in the stream redirection.
Posts: 1,246
Threads: 15
Joined: Oct 2012
Oh, you can use cd as a replacement, so cd to that path (paths in cd are apparently parsed for variables) and then echo to the file.
Posts: 225
Threads: 3
Joined: Oct 2012
variable names should always be parsed and only escaped using double quotes but hey lol its not bash so what do I know
Posts: 1,246
Threads: 15
Joined: Oct 2012
Splatpope Wrote:variable names should always be parsed and only escaped using single quotes or backslashes but hey lol its not bash so what do I know
Posts: 225
Threads: 3
Joined: Oct 2012
Marquesas Wrote:Splatpope Wrote:variable names should always be parsed and only escaped using single quotes or backslashes but hey lol its not bash so what do I know
but it's like a simulation of bash so why not just replicate that behavior