Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CODING WITH DWAINE
#1
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.
Reply
#2
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..
Reply
#3
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.
Reply
#4
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?
Reply
#5
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.
Reply
#6
Is DWAINE specified anywhe-- BAHAHAHAHAHAHA
Reply
#7
this makes bash look fun to script
Reply
#8
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?
Reply
#9
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 |.
Reply
#10
It might be doing something like not replacing $arg2. And I thnk you can get a ^ by using ^^ (or something equally weird)
Reply
#11
Further testing shows that apparently varnames are not parsed in the stream redirection.
Reply
#12
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.
Reply
#13
variable names should always be parsed and only escaped using double quotes but hey lol its not bash so what do I know
Reply
#14
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
Reply
#15
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)