12 / 12
Aug 2011

I recently got a WA on a problem where I thought my solution was pretty solid. My solution uses a few fairly common external commands, but I'm wondering of maybe one or more of them doesn't exist in the bash chroot environment.

Could we get a list of available externals? In this particular case I'm trying to use sort, uniq, and awk, but ideally I'd also like to know about tr, cut, paste, head, tail, sed, and any other common *nix command you'd see in a shell script.

If nothing else, can we get some users to post known-working commands? I'll start: sed works, I used it for solving TEST.

Thanks!

  • created

    Apr '08
  • last reply

    Jul '11
  • 11

    replies

  • 602

    views

  • 7

    users

  • 3

    links

1 year later

bash is fairly ignored around here.

but if i wanted to know the external list,
i would came up with a trial just by submiting the test solution, and cram in a call to one of the external commands. if I get a WA then i blacklist that external.

but i stoped submiting bash solutions here. i will just get WA anyway.

6 months later
3 months later

Currently sed, awk and bc are not available. We will add them of course.

Please suggest any other commands that you think should be available as well.
Let's begin the list with these three:
sed
awk
bc

3 months later

I hope that all these commands are added now.

However, still my bash solution for the problem REVINPUT is getting rejected.

On ideone it works fine : http://ideone.com/PfqLn6 .

Please make appropriate changes.

ls /bin

[         cat     dirname  factor  head    pr        sh     tee       wc
awk       cmp     echo     false   join    printenv  sleep  test      yes
base64    comm    ed       fgrep   look    printf    sort   tr        
basename  csplit  egrep    fmt     md5sum  ptx       split  true
bash      cut     env      fold    nl      rev       sum    tsort
bc        dc      expand   gawk    od      sed       tac    unexpand
cal       ddate   expr     grep    paste   seq       tail   uniq

ls /dev

full  null  random  urandom  zero
1 month later
3 months later
3 months later