Quantcast
Channel: Commands using gcc
Browsing latest articles
Browse All 17 View Live

Image may be NSFW.
Clik here to view.

Klingon programming; weak code must die

$ gcc -Wall -Werror -o prog prog.c || rm -f prog.c View this command to comment, vote or add to favourites View all commands by devoid Diff your entire server config at ScriptRock.com

View Article



Image may be NSFW.
Clik here to view.

C one-liners

$ /lib/ld-linux.so.2 =(echo -e '#include <stdio.h>\nint main(){printf("c one liners\\n");}' | gcc -x c -o /dev/stdout -) /lib/ld-linux.so.2 is the runtime linker/loader for ELF binaries on Linux....

View Article

Image may be NSFW.
Clik here to view.

Compile all C files in a directory

$ ls *.c | while read F; do gcc -Wall -o `echo $F | cut -d . -f 1 - ` $F; done Compile *.c files with "gcc -Wall" in actual directory, using as output file the file name without extension. View this...

View Article

Image may be NSFW.
Clik here to view.

The 1 millionth fibonacci number

$ gcc -x c -o /tmp/out - -lgmp <<< '#include <stdlib.h> ... SEE SAMPLE OUTPUT FOR FULL COMMAND It's hard to beat C. This is just slightly faster than the bc version on my machine. real...

View Article

Image may be NSFW.
Clik here to view.

Display GCC Predefined Macros

$ gcc -dM -E - < /dev/null View this command to comment, vote or add to favourites View all commands by ohe Diff your entire server config at ScriptRock.com

View Article


Image may be NSFW.
Clik here to view.

Display GCC Predefined Macros

$ gcc -dM -E - <<<'' doesn't need /dev/null View this command to comment, vote or add to favourites View all commands by bucciarati Diff your entire server config at ScriptRock.com

View Article

Image may be NSFW.
Clik here to view.

Write and run a quick C program

$ alias cstdin='echo "Ctrl-D when done." && gcc -Wall -o ~/.stdin.exe ~/.stdin.c && ~/.stdin.exe' This is a quick hack to make a gcc caller. Since it runs with gcc instead of tcc, it's...

View Article

Image may be NSFW.
Clik here to view.

Display GCC Predefined Macros

$ echo | gcc -dM -E - another one View this command to comment, vote or add to favourites View all commands by Byung Diff your entire server config at ScriptRock.com

View Article


Image may be NSFW.
Clik here to view.

Check if commands are available on your system

$ for c in gcc bison dialog bc asdf; do if ! which $c >/dev/null; then echo Required program $c is missing ; exit 1; fi; done View this command to comment, vote or add to favourites View all...

View Article


Image may be NSFW.
Clik here to view.

See a full list of compiler defined symbols

$ gcc -dM -E - < /dev/null From http://lists.debian.org/debian-devel/2001/01/msg00971.html . View this command to comment, vote or add to favourites View all commands by lucasrangit Diff your entire...

View Article

Image may be NSFW.
Clik here to view.

Apply only preprocessor for .c file and beautify output

$ gcc -E code.c | sed '/^\#/d' | indent -st -i2 > code-x.c View this command to comment, vote or add to favourites View all commands by enikulenkov Diff your entire server config at ScriptRock.com

View Article

Image may be NSFW.
Clik here to view.

Useless fun

$ echo "main(i){for(i=0;;i++)putchar(((i*(i>>8|i>>9)&46&i >>8))^(i&i>>13|i>>6));}" | gcc -x c - && ./a.out | aplay Something I pulled off 4chan, it...

View Article

Image may be NSFW.
Clik here to view.

Play awesome rythmic noise using aplay

$ echo "main(i){for(i=0;;i++)putchar(((i*(i>>8|i>>9)&46&i>>8))^(i&i>>13|i>>6));}" | gcc -x c - && ./a.out | aplay Try modifying the numbers in the...

View Article


Image may be NSFW.
Clik here to view.

Installation Ksuperkey by one command in Kubuntu.

$ sudo apt-get install git gcc make libx11-dev libxtst-dev pkg-config -y && git clone https://github.com/hanschen/ksuperkey.git && cd ksuperkey && make && sudo mv...

View Article

Image may be NSFW.
Clik here to view.

guitar synthesizer in one line of C

$ f=220;echo "int s=16e3/$f;main(i){unsigned char v[s];read(0,v,s);for(;;)putchar(v[i%s]=(v[i%s]+v[++i%s])/2);}"|gcc -x c -&&./a.out</dev/urandom|aplay -d 2 outputs a f=220Hz guitar string...

View Article


Image may be NSFW.
Clik here to view.

Quickly write and run a C program.

$ vim test.c && gcc -x c -o a.out test.c && ./a.out && rm a.out test.c View this command to comment, vote or add to favourites View all commands by ari2015 Diff your entire...

View Article

Image may be NSFW.
Clik here to view.

List of macros defined by gcc

$ gcc -dM -E - </dev/null Lists all macros and their values defined by gcc. View this command to comment, vote or add to favourites View all commands by slower Diff your entire server config at...

View Article

Browsing latest articles
Browse All 17 View Live




Latest Images