g | x | w | all
Bytes Lang Time Link
418Malbolge Unshackled250811T095933ZWeird Gl
025Vyxal 3250811T122833ZThemooni
053AWK250807T152002Zxrs
266BrainFlak c170414T192408ZWheat Wi
083nroff221019T121033Z鳴神裁四点一号
034Carrot170414T154156Zuser4180
064Aceto170419T091817ZL3viatha
181Brainfuck190422T190513ZLucca Fe
061TSQL190520T200652ZBradC
056Scala190520T180952Zpme
063Haskell190426T144931ZMax Yekh
078cgcc190423T122857Zjdt
085C gcc170414T180500Zcleblanc
041Retina 0.8.2170414T151742ZRiley
229Whitespace190418T142231ZKevin Cr
054Excel Formula190418T124634Zi_saw_dr
02505AB1E190418T123124ZKevin Cr
114brainfuck180416T232424ZJo King
016SOGL V0.12170414T155939Zdzaima
066Excel VBA170416T140352ZTaylor R
063Ruby171229T230157ZHåv
016Charcoal170414T145408Zuser4180
140BF170415T013302ZEsolangi
053Python 3.6170414T152624ZJonathan
058><>170523T042445ZNot a tr
088Swift170414T160551ZMr. Xcod
073Common Lisp170513T191158Zuser6516
052Alice170414T231817ZMartin E
036Pyth170503T064831ZLeaky Nu
049C170419T090427ZKhaled.K
079Java 7170419T072959ZKevin Cr
060JS ES6170417T204309Zuser6827
140C#170416T090851ZAdola
031Vim170416T061910ZBrian Mc
084C gcc170415T215749ZIan M.
087Cgcc170415T204908ZJake Rey
nan170415T150632Zauhmaan
055JavaScript ES6170414T145542ZETHprodu
208C++170414T175418Ztakintoo
065[R]170415T030707Zuser1159
035Japt170414T210257ZOliver
050Bash170414T201912ZMax Mikh
041Retina170414T191937ZDennis
066Lua170414T182055ZBlab
051PHP170414T154242ZJör
022Jelly170414T145521ZJonathan
047JavaScript ES6170414T145845ZShaggy
02605AB1E170414T145728ZMagic Oc
048PowerShell170414T144747ZAdmBorkB
043Sed170414T151306Zmanatwor
059Python170414T151033ZRiker
03205AB1E170414T144328ZEmigna
046Röda170414T150136Zfergusq
062Python 2170414T144320ZDead Pos
070SpecBAS170414T144904ZBrian
076Batch170414T144327ZNeil

Malbolge Unshackled, 418 bytes

(aBA@?>=<;:9876543210/.-,+*)('&%$dc!-}=Nz:x77$G"rqp|/.lkjiha`_H6ba`_X]V?-SRWVUTS6Q4I!MLKDzHGFED'B;_^o=<;:{8765.uc1*NM^,m*)('hg$#"cxP|{z]r8IutmEqponmPkd*;KJedcbaZC1]\[ZS<;u(TSRQPONG0|JIHGFE>ba%q?>!<}:981g54321r/(onJ[)('h}U#"!bw=N^yxwvutmVDponmfON*;gfedcbaZC1]\[ZYXQut8rq$4O2MLKDzHGFED'B;$#]n<;:{2h654u,Paq.-,+*#jX&%|BdcQ}|{zyxwvoXFrqponmf,+*):f_H6baZ~BA/[Z=R*VUT7L5o"NG}KJIHG*E>'ar@?>=<;|9876/vd2+rNMLK\*)('h%|eS!~}|u;(

Try it online!

This challenge uses two equations in order to print the egg:
crazy(crazy(x,0t1111111111...),0t1111111111...) = x, which is useful in order to save a value on the tape, in this case the painted character.
crazy(0t2222222222...,crazy(0t2222222222...,x)) = x, which is useful in order to retrieve a value from the tape. 0t1111111111... can be obtained with one or two crazyops, and since this challenge only has one character as input, 0t2222222222... can be obtained by retrieving the EOF from the input.

After that, the rest of the code is just printing the egg. Nothing special about it. Here's the normalized code:

jiooooooo
ooooooooo
ooooooooo
oooooo**o
vo</o<oi<
v/vooov<<
ooooo      <- Data section

     pppj  <- Code section
/oooopopj
/ppoooooj
ojp/ooop/
ooooojop<
</oooojoo
oopj/op<<
/ojoooojj
ooojp/ooo
jp</oop/o
oooojop</
jjooooopj
/oooopjj<
/ooooooop
j/oooooop
<<j/oojoj
ooop/oooo
ojopjj</o
oojp/oooj
p</jooooo
opj/oooop
jj</ooooo
oopj/oooo
oop<<j<</
jojooop/o
oooojopjj
</ooojp/o
oojp</joo
ooopj/oop
<jj/ooooo
ooopj/ooo
ooop<<<</
opj/oop<j
j/oojp/oo
ojpj</op/
ooooojopj
</ooooooj
oooopj/op
j<<<</ooo
ojopj/ooo
op<v

Vyxal 3, 25 bytes

"⎂②lᑂ▦⎇⎇c▦↯∨“"_ \n/\|"?+⊢

Vyxal It Online!

"⎂②lᑂ▦⎇⎇c▦↯∨“"_ \n/\|"?+⊢­⁡​‎‎⁡⁠⁡‏⁠‎⁡⁠⁢‏⁠‎⁡⁠⁣‏⁠‎⁡⁠⁤‏⁠‎⁡⁠⁢⁡‏⁠‎⁡⁠⁢⁢‏⁠‎⁡⁠⁢⁣‏⁠‎⁡⁠⁢⁤‏⁠‎⁡⁠⁣⁡‏⁠‎⁡⁠⁣⁢‏⁠‎⁡⁠⁣⁣‏⁠‎⁡⁠⁣⁤‏⁠‎⁡⁠⁤⁡‏‏​⁡⁠⁡‌⁢​‎‎⁡⁠⁢⁣⁡‏‏​⁡⁠⁡‌⁣​‎‎⁡⁠⁤⁢‏⁠‎⁡⁠⁤⁣‏⁠‎⁡⁠⁤⁤‏⁠‎⁡⁠⁢⁡⁡‏⁠‎⁡⁠⁢⁡⁢‏⁠‎⁡⁠⁢⁡⁣‏⁠‎⁡⁠⁢⁡⁤‏⁠‎⁡⁠⁢⁢⁡‏⁠‎⁡⁠⁢⁢⁢‏‏​⁡⁠⁡‌⁤​‎‎⁡⁠⁢⁢⁣‏⁠‎⁡⁠⁢⁢⁤‏‏​⁡⁠⁡‌­
"⎂②lᑂ▦⎇⎇c▦↯∨“            # ‎⁡compressed integer
                        ⊢  # ‎⁢to base
             "_ \n/\|"     # ‎⁣literal string
                      ?+   # ‎⁤with input added at the end
💎

Created with the help of Luminespire.

<script type="vyxal3">
"⎂②lᑂ▦⎇⎇c▦↯∨“"_ \n/\|"?+⊢ ¶p
</script>
<script>
    args=[["_"],["%"],["~"],["&"],["#"]]
</script>
<script src="https://themoonisacheese.github.io/snippeterpreter/snippet.js" type="module"/>

AWK, 53 bytes

$0="  __\n /"(s=$1$1)"\\\n/"s s"\\\n|"s s"|\n\\____/"

Attempt This Online!

Brain-Flak -c, 270 268 266 bytes

(((((((((({}<(((([(()()())]((((((((((({}){}){}){}){}[()]))<>)<>{}())))))<>)<>(((()()()()()){}))({}()){})<>)<>>))))<<>({}<>)((()()()()()){})<>({}<>)>))))<<>((({})<>)({})<((()()()()()){})>[()()])>))<>((((({})<>)[(()()()()())({}){}])<((()()()()()){})<>((({}<>){}()))>))

Try it online!

I was going to write an explanation, but I took a nap first and forgot how this whole thing works. Your guess is as good as mine.

nroff, 83 bytes

I found a way to outgolf to get a verbatim output so I could draw ascii art with fewer bytes: it was to use .nf.

.de F
  __
.nf
 /\\$1\\$1\\\\
/\\$1\\$1\\$1\\$1\\\\
|\\$1\\$1\\$1\\$1|
\\\\____/
..

Attempt This Online!


nroff, 103 bytes

.de F
  __
.sp 0
 /\\$1\\$1\\\\
.sp 0
/\\$1\\$1\\$1\\$1\\\\
.sp 0
|\\$1\\$1\\$1\\$1|
.sp 0
\\\\____/
..

Attempt This Online!

I tried using more macros to shorten but failed. I had to do such annoying escaping a lot.

Usage

.F #

.F %

Carrot, 34 bytes

  __
 /##\\
/####\\
|####|
\\____/

Try it online here.

First, we are in caret-mode, where every character gets pushed to the "stack". And finally the "stack" gets printed as output.

In caret-mode, # pushes the input, so the instances of # are basically replaced with the input (FYI # is a one-byte cat program).

Aceto, 68 64 bytes

8 by 8, so a 3rd order Hilbert curve.

/"ppp(pp
np(p"pp)
\\)p|n
"\"\\\
)k,p\\n"
pp/"__\|
   n__
"__\/"p

Since we're already non-competing, I used features introduced after the question was posted.

Output:

  __
 /==\
/====\
|====|
\____/

Brainfuck - 257 bytes 181 bytes

Golfed: Live version click here

+++++++[>++++++<-]>[>+>++>++>++<<<<-]>+++++>>>>++++++++++[>+++>+<<<++++<+<+>>>-]>++<<<--<+>>>,>..<<<<..>>>>>.<.<<<<<.>>>>..<<.>>>>.<<<<<<.>>>>....<<.>>>>.<<<.>....<.>>>.<<<<.<....<.

I'm not a professional golfer though; this is my first attempt.

Output:

  __ 
 /XX\ 
/XXXX\ 
|XXXX| 
\____/ where X is the given char.

Ungolfed ( + comments) :

; chars:
; _ 95
; / 47
; \ 92
; | 142
; min val = 42 (7 times 6)

; lets do some math
+++++++[>++++++<-]> ; effectively 7 times 6

; now lets copy this to the next pointers multiplying by 2 
the subsequent ones after the 1st
[>+>++>++>++<<<<-]

>+++++
>>>

> ; empty space starting from this pointer
++++++++++[>+++>+<<<++++<+<+>>>-]
>++<
<<--<+
>>>,
>..<<<<..>>>>>.<.
<<<<<.
>>>>..<<.>>>>.
<<<<<<.>>>>....<<.>>>>.
<<<.>....<.
>>>.<<<<.<....<.

T-SQL, 63 61 bytes

SELECT REPLACE('  __
 /11\ 
/1111\ 
|1111|
\____/',1,v)FROM t

Old challenge, but didn't see a SQL solution.

Input is taken via pre-existing table t with text field v, per our IO standards.

SQL allows line break literals in strings, so a pretty straight-forward replace. Lines 2 and 3 have an extra space after the final \, so the line break isn't escaped.

EDIT: Discovered that I can save 2 bytes by using a numeral as the replacement character instead of something like '.' that needs quotes. Turns out REPLACE does the implicit conversion to string.

Scala, 56 bytes

print("""  __
 /~\
/~~\
|~~|
\____/""".replace("~",i+i))

Try it online!

Haskell, 70 63 bytes

7 bytes down with great help from Laikoni

(<$>"  __\n /~~\\\n/~~~~\\\n|~~~~|\n\\____/").(?)
d?'~'=d
d?c=c

Try it online!

The function f takes a character to paint the egg with.

c(gcc) 81 78 bytes

*s;f(c){for(s=LR"(  __
 /00\
/0000\
|0000|
\____/)";*s;s++)printf(*s%6?s:&c);}

Try it online

C (gcc), 95 88 85 bytes

Thanks to Albert for -7 bytes

Thanks also to ceilingcat -3 bytes

f(c){for(int*s=L"  __\n /00\\\n/0000\\\n|0000|\n\\____/\n";*s;s+=printf(*s%6?s:&c));}

Try it online!

Retina 0.8.2, 43 41 bytes

-2 bytes thanks to Kevin Cruijssen

.
$&$&
..
  __¶ /$&\¶/$&$&\¶|$&$&|¶\____/

Try it online!

Whitespace, 240 229 bytes

[S S S T    S T T   T   T   N
_Push_47][S S S T   S T T   T   T   T   N
_Push_95][S N
S _Duplicate_95][S N
S _Duplicate_95][S N
S _Duplicate_95][S S S T    S T T   T   S S N
_Push_92][S S S T   S T S N
_Push_10][S S S T   T   T   T   T   S S N
_Push_124][S T  S S T   S N
_Copy_0-based_2nd_(92)][S N
S _Duplicate_92][T  N
T   S _Read_STDIN_as_character][T   T   T   _Retrieve][S N
S _Duplicate_input][S N
S _Duplicate_input][S N
S _Duplicate_input][S S S T T   T   T   T   S S N
_Push_124][S S S T  S T S N
_Push_10][S T   S S T   S S S N
_copy_0-based_8th_(92)][S N
S _Duplicate_92][T  T   T   _Retrieve][S N
S _Duplicate_input][S N
S _Duplicate_input][S N
S _Duplicate_input][S S S T S T T   T   T   N
_Push_47][S S S T   S T S N
_Push_10][S S S T   S T T   T   S S N
_Push_92][S N
S _Duplicate_92][T  T   T   _Retrieve][S N
S _Duplicate_input][S T S S T   S S N
_Copy-0-based-4th-(47)][S S S T S S S S S N
_Push_32][S S S T   S T S N
_Push_10][S S S T   S T T   T   T   T   N
_Push_95][S N
S _Duplicate_95][S T    S S T   T   N
_Copy-0-based-3rd-(32)][S N
S _Duplicate_32][N
S S N
_Create_Label_LOOP][T   N
S S _Print_as_character][N
S N
N
_Jump_to_Label_LOOP]

Letters S (space), T (tab), and N (new-line) added as highlighting only.
[..._some_action] added as explanation only.

Try it online.

Explanation:

Since we have to incorporate the input character in the output, I couldn't apply this Whitespace tip of mine which I always use for ASCII-art or other print challenges in Whitespace, which would lower each value and inside the printing loop add it again. So instead this is a pretty simple program which does the following:

  1. Push all characters reversed to the stack, including the input-characters
    • With bytes saved using Duplicates and Copy's-of
  2. Then loop and print the characters from the top of the stack to the bottom (which is why we push the characters in reverse order).

Excel Formula, 54 bytes

Makes use of multi-line entry in the formula bar (Alt+Enter), where # is your chosen character to paint!

=SUBSTITUTE("  __
 /~~\
/~~~~\
|~~~~|
\____/","~","#")

05AB1E, 25 bytes

"ÿ_
\/|"•θ8Ë1Âõ]ư•6вèJ.c

Try it online.

Explanation:

"ÿ_
\/|"                   # Push the string "ÿ\n\/|", where `ÿ` is automatically filled 
                       # with the (implicit) input-character
    •θ8Ë1Âõ]ư•        # Push compressed integer 1269961759550053939510
               6в      # Converted to Base-6 as list: 
                       #  [1,1,2,4,0,0,3,2,4,0,0,0,0,3,2,5,0,0,0,0,5,2,3,1,1,1,1,4]
                 èJ    # Index each into the string, and then join together
                   .c  # And centralize it to add the appropriate leading spaces
                       # (after which the result is output implicitly)

See this 05AB1E tip of mine (sections How to compress large integers? and How to compress integer lists?) to understand why •θ8Ë1Âõ]ư• is 1269961759550053939510 and •θ8Ë1Âõ]ư•6в is [1,1,2,4,0,0,3,2,4,0,0,0,0,3,2,5,0,0,0,0,5,2,3,1,1,1,1,4].

brainfuck, 114 bytes

-----[[<+>->++>++<<]->]<+++++++++++<+..<..>>.<.<<.>>,..<---.>>.<<<.>>....<.>>.<<<<---.>>>....<<<.>>>>.<<.+++....<.

Try it online!

I've used BF Crunch here to find a more optimal way to generate the individual characters.

SOGL V0.12, 21 18 16 bytes

0≈⁾‛≤¦¶W?5┼EB§  ‘

Try it Here!

The whole program is the following compressed:

  __
 /ŗŗ\
/ŗŗŗŗ\
|ŗŗŗŗ|
\____/

where ŗ gets replaced with the input.

13 bytes almost works too, but it does unneeded things with certain inputs..

Excel VBA, 66 Bytes

Anonymous Excel VBE immediates window function that takes a clean input of 1 character from cell [A1] on the ActiveSheet object and prints to the VBE immediate window.

?Replace(Replace("  __0 /11\0/1111\0|1111|0\____/",0,vbCr),1,[A1])

Ruby, 63 bytes

puts"  __  \n /00\\ \n/0000\\\n|0000|\n\\____/".gsub"0",$*[0]

As basic as it gets, honestly

Charcoal, 30 26 16 bytes

Two bytes saved thanks to @Neil by filling after making the shape

__↗¹←↑¹↖²↓_‖M←¤S

Try it online!

Explanation

The program works by first creating the right half of the egg, and then reflecting it to generate the left half.

__↗¹                          Write the two bottom _s and write the /
←↑¹                           Move left and write the |
↖²                            Then write two \s
↓_                            And the top _
‖M←                          Reflect the canvas to the left
¤S                           Fill the shape with the string input

BF, 142 140 bytes

++++[->++++<]>[->+++>++++++>+>++++++>++>++++++++<<<<<<],>->---->------>->..<..<.>>.<<<<.<..
>>.>.<<.<....>>.>.>>>----.<....>.<<<.<.>>....<<<.

This is split across two lines for clarity; the newline is not counted.

It's fairly easy to write this sort of thing in BF, but it's non-trivial how to optimize the order of the cells to minimize movement. I wrote a brute-forcer script to try all the combinations and find the shortest, and I golfed it a bit to account for a golfing opportunity I hadn't included in the brute-forcer.

Python 3.6, 53 bytes

lambda x:fr'''  __
 /{2*x}\
/{4*x}\
|{4*x}|
\____/'''

lambda x:f'  __\n /{2*x}\\\n/{4*x}\\\n|{4*x}|\n\____/'

I can't see an online interpreter for Python 3.6 though.
Try it at repl.it (says 3.5 but it is 3.6)

><>, 58 bytes

|v"  __   /":{"\ /"}::::{"\|"}::::i"|\____/"
o>ooooool?!;a

Try it online, or at the fish playground!

Takes input from STDIN. If you're allowed to exit with an error, you can get rid of the l?!; in the second line.

Explanation: The fish swims through the first line backwards, so it reads "/____\|"i::::}"|\"{::::}"/ \"{:"/ __ ". This builds up the string in reverse, keeping a copy of the input at the back of the stack for when it's needed again. The fish then gets to row 2, which prints six characters and a newline and then loops until the stack is empty.

Swift - 88 bytes

var f={x in"  __\n /&&\\\n/&&&&\\\n|&&&&|\n\\____/".replacingOccurrences(of:"&",with:x)}

Lambda-like function with usage: print(f("x")).

Try it out here!


NOTE: In some environments, as in the one linked above, this requires import Foundation, but on a standard project it doesn't. That's because replacingOccurrences() belongs to Foundation, but Xcode projects have that optimised, and is not required.

Common Lisp, SBCL, 73 bytes

(format t"  __
 /~@?\\
/~@?~@?\\
|~@?~@?|
\\____/""~2@{~a~:*~}~@*"(read))

Alice, 53 52 bytes, non-competing

Thanks to Leo for indirectly saving 1 byte.

/o *^i}'.*[;.h~r}}~"{.[^\\
@"S .^~ y~a}~~.["{!~"}^^^

Try it online!

Unfortunately, I had to fix a bug with y (transliteration) to make this work, so I've marked it as non-competing.

Explanation

The basic idea is to create a string of the egg but with ~ as a placeholder for two copies of the input. However, the other characters of the input aren't particularly friendly for Alice strings, because those can't contain linefeeds, and all of /\_| would need escaping (because they're treated as mirrors and walls). So I can save some bytes by using placeholders for these as well, and then transliterating them. The placeholders for /\_| are .[^{, which are simply the character right before the one they represent. For the linefeed I'm using }.

Now the code... the entire program can be solved in Ordinal mode since we only need string processing and no processing of integers. Furthermore, we don't need any conditional control flow. The entire program can be expressed linearly. The general structure of the program is this:

/...//
@....

In such a program, the IP bounces up and down through the ... section, first only executing half of the characters. Then the two / at the end move the IP right by one cell, so that on the way back it executes the other half (again bouncing up and down) until finally the @ terminates the program. So if we unfold the funny zigzag structure in the middle, the program we're executing really looks like this:

"  ^^} .~[}.~~[}{~~{}[^^^^.""!}"r.h~;a*y'~i.*So

Let's go through this:

"  ^^} .~[}.~~[}{~~{}[^^^^."
      This first string is simply the egg template I've talked about.
"!}"  Push this string. It covers all the characters we need to replace
      in the template except ~.
r     Range expansion. Turns '!}' into '!"#$...z{|}'.
.     Duplicate.
h~;   Split off the first character, swap it to the top and discard it.
a*    Append a linefeed.
      We've now basically rotated the string to the left, but appended
      a linefeed instead of the exclamation mark we've shifted off.
      This maps each character in the string to the next one, except }
      which gets mapped to a linefeed.
y     Transliterate. Since the strings have the same length, this just maps
      each character in the first string to the corresponding character in
      the second string, replacing all of our placeholder characters.
'~    Push "~".
i.*   Read the input and duplicate it.
S     Substitute all "~" with the doubled input.
o     Output the result.

Pyth, 36 bytes

jm:s@L"-/|\\_ "jCd6\-+QQ"ԈџÛƲ獩

Try it online!

C, 49 bytes

f(){puts("  __\n /~~\\n/~~~~\\n|~~~~|\n\____/");}

Output Live

  __
 /~~\
/~~~~\
|~~~~|
\____/

Unicode, 77 bytes

g(){printf("  .\u2322.\n\n\u239bHAPPY\u239e\n EASTER\n\u239d.___.\u23a0\n");}

Output

  .⌢.

⎛HAPPY⎞
 EASTER
⎝.___.⎠

Java 7, 79 bytes

String f(String c){return"  __\n /x\\\n/xx\\\n|xx|\n\\____/".replace("x",c+c);}

Explanation:

String f(String c){                           // Method with String(-character) parameter and String return-type
  return "  __\n /x\\\n/xx\\\n|xx|\n\\____/"  //  Return this String
    .replace("x",c+c);                        //  And replace every 'x' with two times the input String-character
}                                             // End of method

Test code:

Try it here.

class Main{
  static String f(String c){return"  __\n /x\\\n/xx\\\n|xx|\n\\____/".replace("x",c+c);}

  public static void main(String[] a){
    System.out.println(f("^"));
    System.out.println(f("|"));
    System.out.println(f("o"));
  }
}

Output:

  __
 /^^\
/^^^^\
|^^^^|
\____/
  __
 /||\
/||||\
||||||
\____/
  __
 /oo\
/oooo\
|oooo|
\____/

JS (ES6), 60 bytes

x=>`  __
 /~\\
/~~\\
|~~|
\\____/`.replace(/~/g,x.repeat(2))

Basically the same thing as the python answer.

C#, 140 Bytes

class x{static void Main(){System.Console.WriteLine(("  __\n"+@" /%%\"+'\n' +@"/%%%%\"+'\n'+@"|%%%%|"+'\n' +@"\____/ ").Replace("%","A"));}}

It's my first time codegolfing :) Anyway, this works by replacing '%' from the example to any character you want. This prints out:

  __
 /AA\
/AAAA\
|AAAA|
\____/

Vim, 31 bytes

Expects the input character to be the only thing in the buffer to start. Ends in insert mode with the egg displayed in the buffer. I have replaced ^M and ^O with <CR> and <C-O> for readability. All whitespace is significant.

s  __<CR> /<C-O>2p\<CR>/<C-O>4p\<CR>|<C-O>4p|<CR>\____/

Since V is backwards-compatible, you can Try it online!

Explanation:

s                                                       " Delete input (storing it to the default register) and enter insert mode
   __<CR>                                               " Type "  --\n"
          /                                             " Type " /"
           <C-O>2p                                      " Paste twice from the default register without leaving insert mode (e.g. put "%%")
                  \<CR>                                 " Type "\\\n"
                       /                                " Type "/"
                        <C-O>4p                         " This time paste 4 times
                               \<CR>                    " Type "\<CR>"
                                    |<C-O>4p|<CR>       " Same drill, but with | before and after
                                                 \____/ " The bottom of the egg

C (gcc), 84 bytes

g(f){char e[]={f,f,f,f};printf("  __\n /%.2s\\\n/%.4s\\\n|%.4s|\n\\____/\n",e,e,e);}

Try it online!

C(gcc), 87 bytes

e(d){printf("  __\n /%c%c\\\n/%c%c%c%c\\\n|%c%c%c%c|\n\\____/\n",d,d,d,d,d,d,d,d,d,d);}

printf without stdio.h causes warnings but no errors, allowing successful compilation.

Explanation

Printf statement that crams everything into one line, formatting the decoration character with %c.

Try it online

C#, 56 bytes


Golfed

i=>"  __\n /i\\\n/ii\\\n|ii|\n\\____/".Replace("i",i+i);

Ungolfed

i => 
   "  __\n /i\\\n/ii\\\n|ii|\n\\____/"
      .Replace( "i", i + i );

Ungolfed readable

i => 
   "  __\n /i\\\n/ii\\\n|ii|\n\\____/"
      
      // Replace every instance of 'i' with the input cloned twice
      .Replace( "i", i + i );

Full code

using System;
using System.Collections.Generic;

namespace Namespace {
   class Program {
      static void Main( String[] args ) {
         Func<String, String> f = i => 
            "  __\n /i\\\n/ii\\\n|ii|\n\\____/"
               .Replace( "i", i + i );

         List<String>
            testCases = new List<String>() {
               "-",
               "%",
               "~",
               "o",
               " ",
         };

         foreach( String testCase in testCases ) {
            Console.WriteLine( $" Input: {testCase}\nOutput:\n{f( testCase )}\n" );
         }

         Console.ReadLine();
      }
   }
}

Releases


Notes

The printed results within the link provided will not look like pretended, due to the font used not being monospace.

JavaScript (ES6), 55 bytes

x=>`  __
 /0\\
/00\\
|00|
\\____/`.replace(/0/g,_=>x+x)

C++ 208 bytes

In response to comments: This is a complete re-post.

#include<iostream>
using namespace std;int main(){char e;cin>>e;cout<<"  __  \n";cout<<" /"<<e<<e<<"\\ "<<endl;cout<<"/"<<e<<e<<e<<e<<"\\"<<endl;cout<<"|"<<e<<e<<e<<e<<"|"<<endl;cout<<"\\____/ \n";return 0;}

[R], 65 bytes

cat(gsub('x',scan(,''),"  __\n /xx\\\n/xxxx\\\n|xxxx|\n\\____/"))

Pretty unspectacular, please find a shorter one in R... It's your basic gsub

Japt, 35 bytes

"  __
 /01
/001
|00|
1____/"d0U²1'\

Try it online!

41-byte solution:

[S²'_²RS'/U²'\R'/U²²'\R'|U²²'|R'\'_²²'/]q

Try it online!

Bash, 50 bytes

echo "  __
 /$1$1\\
/$1$1$1$1\\
|$1$1$1$1|
\____/"

I've also tried to do pattern substitution during parameter expansion, but it seems like the most straightforward way to do this is also the shortest.

Try it online!

Retina, 41 bytes

.
$0$0
..
  __¶ /$0\¶/$0$0\¶|$0$0|¶\____/

Try it online!

Lua, 66 bytes

print((([[  __
 /ee\
/eeee\
|eeee|
\____/]]):gsub("e",io.read())))

((([[#NailedIt]])))

PHP, 51 bytes

$a.=$a=$argn;echo"  __
 /$a\
/$a$a\
|$a$a|
\____/";

PHP, 58 Bytes without physical linebreaks

$a.=$a=$argn;echo"  __\n /$a\\\n/$a$a\\\n|$a$a|\n\\____/";

run this with -R option

61 Bytes

echo strtr("  __\n /88\\\n/8888\\\n|8888|\n\\____/",8,$argn);

Jelly, 24  22 bytes

Ḥ;“ ¶/\|_”“Ṁ¢ṚR;ḳ}AṠ’ṃ

Try it online!

How?

Ḥ;“ ¶/\|_”“Ṁ¢ṚR;ḳ}AṠ’ṃ - Main link: character c  e.g. '~'
Ḥ                      - double c: ['~','~']
  “ _¶/\|”             - string literal: [' ','_',<newline>,'/','\','|']
 ;                     - concatenate c:  [['~','~'],' ','_',<newline>,'/','\','|']
          “Ṁ¢ṚR;ḳ}AṠ’  - base 250 number: 3067183430901851641706
                     ṃ - base decompression with reversed @rguments:
                       -     take the number and convert it to a base length(the list)
                       -     then index (1-based) into that same list.
                       -     i.e.: 3067183430901851641706 in base 7
                                 = 22003241534115361163500004
                                   indexed into [['~','~'],' ','_',<newline>,'/','\','|']
                                 = [' ',' ','_','_',<newline>,' ','/',['~','~'],'\',<newline>,'/',['~','~'],['~','~'],'\',<newline>,'|',['~','~'],['~','~'],'|',<newline>,'\','_','_','_','_','/']
                       - implicit print:  __
                                         /~~\
                                        /~~~~\
                                        |~~~~|
                                        \____/

JavaScript (ES6), 53 49 47 bytes

I'm sure I can squeeze a bit more out of this - having to escape the \s is annoying me.

f=

c=>`  __
 /${c+=c}\\
/${c+=c}\\
|${c}|
\\____/`

console.log(f`-`)
console.log(f`%`)
console.log(f`~`)
console.log(f`&`)
console.log(f`#`)


Paint Your Own!

f=

c=>`  __
 /${c+=c}\\
/${c+=c}\\
|${c}|
\\____/`

o.innerText=f` `;i.addEventListener("input",function(){o.innerText=f(this.value||" ");})
<input maxlength="1" id="i">
<pre id=o></pre>

05AB1E, 32 29 26 bytes (Thanks to Emigna/Adnan)

•jÀňiXƒÐ[Z•6B6ôvy5ÝJ¹"_ |/\ÿ"‡,

Try it online!

•jÀňiXƒÐ[Z•6B6ô # Push ['110011', '135541', '355554', '255552', '400003']
vy               # For each encrypted block...
  5ÝJ            # Push 012345.
     ¹"_ |/\ÿ"   # Push "_ |/\{input_char}".
              ‡, # Swap the charsets.

29 byte version (smarter w/o iteration needed due to encoding newlines as well):

05AB1E, 29 bytes (Emigna)

•P£<r7»TwDšç6•5ÝJI"
_/ÿ\|"‡.c

Try it online 2!


26 byte extension of Emigna's suggestion, using S to separate the chars into an array, then a[b] to interpolate each digit with the corresponding location in the previous array. This is essentially an element-wise transliteration (smart).

05AB1E, 26 bytes (Adnan)

"
_/ÿ\|"•P£<r7»TwDšç6•Sè.c

Try it online 3!

PowerShell, 50 49 48 bytes

'  __
 /11\
/1111\
|1111|
\____/'-replace1,$args

Try it online!

Straightforward string replacement into a literal string. Not much room for golfing.

-1 byte thanks to HyperNeutrino; -1 byte thanks to wubs

Sed, 43 characters

s:.:  __\n /&&\\\n/&&&&\\\n|&&&&|\n\\____/:

Sample run:

bash-4.3$ sed 's:.:  __\n /&&\\\n/&&&&\\\n|&&&&|\n\\____/:' <<< '★'
  __
 /★★\
/★★★★\
|★★★★|
\____/

Python, 59 bytes

lambda n:r'''  __
 /a\
/aa\
|aa|
\____/'''.replace('a',n*2)

05AB1E, 34 33 32 bytes

„__I244S×'/ì'\«`©¦¨'|.ø®R¹'_‡).c

Try it online!

Explanation

„__                               # push "__"
   I244S×                         # push a list of the input repeated 2 and 4 and 4 times
         '/ì                      # prepend "/"
            '\«                   # append "\"
               `                  # split list to separate items
                ©                 # store a copy of the last one in register
                 ¦¨               # remove first and last item of the string
                   '|.ø           # surround with pipes
                       ®R         # retrieve the string from register and reverse it
                         ¹'_‡     # replace input with "_"
                             ).c  # print each line centered

Röda, 46 bytes

{a=`  __
 /-\
/--\
|--|
\____/`a~="-",_*2;[a]}

Try it online!

Python 2, 62 bytes

Super straight-forward. Try it online.
-1 byte, thanks to @mbomb007

print r'''  __
 /~\
/~~\
|~~|
\____/'''.replace('~',input()*2)

SpecBAS - 70 bytes

1 INPUT a$:  ?"  __"'" /";a$*2;"\"'"/";a$*4;"\"'"|";a$*4;"|"'"\____/"

? is shorthand for PRINT command, and apostrophe moves cursor to next line.

Batch, 76 bytes

@for %%l in ("  __" " /%1%1\" "/%1%1%1%1\" "|%1%1%1%1|" \____/)do @echo %%~l

Note: To run this with special characters such as &, prefix the character with a ^.