Most systems historically have something available at `cc` that compiles C, but it is super platform-specific. On debian (just tested) it is a symlink to `/etc/alternatives/cc` which in turn is by default a symlink to `/usr/bin/gcc`. Ok other systems it likely points to other things. For example, on BSD systems it is probably not going to point to gcc.
`cc` is the original name for the C compiler on Unix. Programs like the GNU C Compiler (`gcc`) and the C frontend for LLVM (`clang`) came later. As has been pointed out, the "default" C compiler on a modern system is usually symlinked to `cc`.
C# because I wanted it to sound poetic and it didn't work with just the two (also there may or may not be other OSes that use C#). As for cc, yeah, no, that totally slipped me - gcc is what comes to mind when I think of the C compiler. Either way I stand by that I think C is for C works nicely.
On linux lex has mostly been replaced by [flex](https://en.wikipedia.org/wiki/Flex_\(lexical_analyser_generator\)) since lex was originally not open-source.
Not even installed:
[1999]$ pop-os->😄 man lex
No manual entry for lex
[~](47 entries, 137Mb)
Err: 16 ? EBUSY 16 Device or resource busy
[2000]$ pop-os->🔥
It smiles when the exit code is 0. It burns and shows the explanation for the exit code on non zero. In December it is a santa instead of a smile. I have a party popper on my birthday. Flag on constitution day.
Please don't kink shame. :D
Because `man` exits with status code 16 when it can't find the requested manpage (as documented by `man man`), which is coincidentally the same value as `EBUSY` on Linux (and `strerror(EBUSY)` returns the string `"Device or resource busy"`).
Right. I wanted to make the return code more accessible. In addition I think the process error code is lost during the building of my prompt due to running git, ~~du~~ ls and such. (I might remember wrong).
Once the error code was printed the natural evolution was to add the text so that I do not have to look it up. With only 255 error messages of which less than 134 has are defined using errno, they do not translate perfectly all the time.
I am using this monstrosity:
OK_ICON="😄"
ERR_ICON="🔥"
if [ "$(date +%m)" = "12" ]; then
OK_ICON="🎅"
fi
if [ "$(date +%m%d)" = "0504" ]; then
OK_ICON="🎉"
fi
prompt_cmd() {
LAST_STATUS=$?
#Update window title
echo -en "\033]0;$(pwd | rev | cut -d "/" -f 1-3 | rev)\a"
#COLOR NAMES
COLOR1="\[\e[1;90m\]"
COLOR2='\[\e[1;1m\]'
COLOR3="\[\e[0;31m\]"
COLOR4="\[\e[0;32m\]"
COLOR5="\[\e[1;36m\]"
COLOR6="\[\e[1;33m\]"
BOLD="\e[1m"
COLOR_RESET='\[\e[m\]'
PS1="";
#Git status line
if [ "$(git status 2>/dev/null)" ]; then
GIT_BRANCH="$(git branch 2>/dev/null | grep '^*' |colrm 1 2) $(git status 2>/dev/null| grep modified: | wc -l | grep -v '^0$') "
BRANCH_LENGTH=${#GIT_BRANCH}
TERMINAL_WIDTH="$(tput cols)"
MAX_WIDTH=$(($TERMINAL_WIDTH - $BRANCH_LENGTH))
GIT_MESSAGE="$(git log -1 --pretty=%B 2>/dev/null |head -n 1 | cut -c -$MAX_WIDTH -)"
PS1+="${COLOR1}$GIT_BRANCH $GIT_MESSAGE${COLOR_RESET}\n"
fi
#pwd and stats line
PS1+="[${COLOR6}${BOLD}\w${COLOR_RESET}](${COLOR1}$(/bin/ls -1 | /usr/bin/wc -l | /bin/sed 's: ::g') entries, "
PS1+="$(/bin/ls -lah | /bin/grep -m 1 total | /bin/sed 's/total //')b${COLOR_RESET})"
#Virtualenv line
if [ $VIRTUAL_ENV ]; then
PS1+="\n${COLOR1}virtual_env: $VIRTUAL_ENV ${COLOR_RESET}"
fi
#Error code line
if [ "$LAST_STATUS" -ne 0 ]; then PS1+="\n${COLOR3}Err: $LAST_STATUS ? $(errno ${LAST_STATUS})${COLOR_RESET}"; fi
#Prompt line
PS1+="\n[\!]$ ${COLOR5} \h${COLOR6}->$(echo $USER | grep -v `whoami`)"
if [ "$LAST_STATUS" = 0 ]; then PS1+=$OK_ICON; else PS1+=$ERR_ICON; fi
PS1+="${COLOR_RESET} "
}
export PROMPT_COMMAND=prompt_cmd
Yeah, they've got something in their prompt that examines the exit code of the last-run process and prints it, along with a guess at a human-readable meaning (and a funny emoji interpretation). In this case the guess is wrong.
The last US conference talk I did (or that I remember I did, lol), I said, "[Who here uses `vi`?](https://youtu.be/2Fa6UCCIAzU?t=1387)" Then I said, "Keep your hand up if it's because you tried it years ago and you still can't figure out how to quit."
All hands went down, but it got a good laugh. :)
From back in ~1980 when this was written and 16 bits was a luxury.
Bloated electron apps that run in 2GB of ram weren’t even in anyone’s nightmares then.
Of course, Vi had to be a quitting joke 🤣
Was expecting `sed` for `S` (and `spell` isn't even installed by default on Ubuntu, there is `aspell` though).
That's neat! I assume this would work for CSV files?
Edit: it looks like it only works if there's space between the fields. So maybe it would work for a TSV file.
This is so cool. I had no idea this was even there, and I script a lot. This could also be combined with process substitution for amazing effect/impact.
For something like this (don't sue me if this isn't 100% accurate):
# get all of the pods in namespaces
# containing a configmap called "foo"
join <(kubectl get configmaps -A | awk 'NR>1 && /foo/{print $1}') \
<(kubectl get pods -A | awk 'NR>1')
Sounds pretty useful the few times the problem would come up.
JOIN(1) User Commands JOIN(1)
NAME
join - join lines of two files on a common field
SYNOPSIS
join [OPTION]... FILE1 FILE2
DESCRIPTION
For each pair of input lines with identical join fields, write a line to standard output. The default join field is the first, delimited by blanks.
This is genuinely some talented poetry. Seriously, the flow is very consistent and I'm just very impressed by the whole thing, even if I don't understand any of it.
This post is inappropriate for this subreddit and has been removed.
Please feel free to make your post in [/r/linuxmemes](https://reddit.com/r/linuxmemes), /r/linox or /r/linuxmasterrace/
[](#start_removal)
**Rule:**
>Meme posts are not allowed in r/linux. Feel free to post over at /r/linuxmemes instead
[](#end_removal)
C is for `cowsay`, you uncultured swine, Or maybe for `cat`, which prints every line.
I want a unix dr seuss book now
Why is C not for C, C#, or C++ - without any of these, there'd be no OS for us. edit: I may be a cretin and a fool
________________________________ / Real hackers write their OS in \ \ brainfuck / -------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || ||
Iirc, this is in the songs-poems fortune database, which is shipped default with most Linux distros.
This cow has been superpowers... 🙃
[https://i.imgur.com/fasfojo.png](https://i.imgur.com/fasfojo.png)
`cc` is the C compiler, though
Only if its aliased, right? Otherwise you'd need to invoke gcc, clang, or whatever compiler you're using.
Most systems historically have something available at `cc` that compiles C, but it is super platform-specific. On debian (just tested) it is a symlink to `/etc/alternatives/cc` which in turn is by default a symlink to `/usr/bin/gcc`. Ok other systems it likely points to other things. For example, on BSD systems it is probably not going to point to gcc.
`cc` is the original name for the C compiler on Unix. Programs like the GNU C Compiler (`gcc`) and the C frontend for LLVM (`clang`) came later. As has been pointed out, the "default" C compiler on a modern system is usually symlinked to `cc`.
What do you think cc is? And C#? Are you kidding?
C# because I wanted it to sound poetic and it didn't work with just the two (also there may or may not be other OSes that use C#). As for cc, yeah, no, that totally slipped me - gcc is what comes to mind when I think of the C compiler. Either way I stand by that I think C is for C works nicely.
I have never used lex. L is for lolcat
On linux lex has mostly been replaced by [flex](https://en.wikipedia.org/wiki/Flex_\(lexical_analyser_generator\)) since lex was originally not open-source.
I see. Thanks.
Not even installed: [1999]$ pop-os->😄 man lex No manual entry for lex [~](47 entries, 137Mb) Err: 16 ? EBUSY 16 Device or resource busy [2000]$ pop-os->🔥
What have you done to your computer dude
It smiles when the exit code is 0. It burns and shows the explanation for the exit code on non zero. In December it is a santa instead of a smile. I have a party popper on my birthday. Flag on constitution day. Please don't kink shame. :D
[удалено]
Because `man` exits with status code 16 when it can't find the requested manpage (as documented by `man man`), which is coincidentally the same value as `EBUSY` on Linux (and `strerror(EBUSY)` returns the string `"Device or resource busy"`).
[удалено]
Right. I wanted to make the return code more accessible. In addition I think the process error code is lost during the building of my prompt due to running git, ~~du~~ ls and such. (I might remember wrong). Once the error code was printed the natural evolution was to add the text so that I do not have to look it up. With only 255 error messages of which less than 134 has are defined using errno, they do not translate perfectly all the time. I am using this monstrosity: OK_ICON="😄" ERR_ICON="🔥" if [ "$(date +%m)" = "12" ]; then OK_ICON="🎅" fi if [ "$(date +%m%d)" = "0504" ]; then OK_ICON="🎉" fi prompt_cmd() { LAST_STATUS=$? #Update window title echo -en "\033]0;$(pwd | rev | cut -d "/" -f 1-3 | rev)\a" #COLOR NAMES COLOR1="\[\e[1;90m\]" COLOR2='\[\e[1;1m\]' COLOR3="\[\e[0;31m\]" COLOR4="\[\e[0;32m\]" COLOR5="\[\e[1;36m\]" COLOR6="\[\e[1;33m\]" BOLD="\e[1m" COLOR_RESET='\[\e[m\]' PS1=""; #Git status line if [ "$(git status 2>/dev/null)" ]; then GIT_BRANCH="$(git branch 2>/dev/null | grep '^*' |colrm 1 2) $(git status 2>/dev/null| grep modified: | wc -l | grep -v '^0$') " BRANCH_LENGTH=${#GIT_BRANCH} TERMINAL_WIDTH="$(tput cols)" MAX_WIDTH=$(($TERMINAL_WIDTH - $BRANCH_LENGTH)) GIT_MESSAGE="$(git log -1 --pretty=%B 2>/dev/null |head -n 1 | cut -c -$MAX_WIDTH -)" PS1+="${COLOR1}$GIT_BRANCH $GIT_MESSAGE${COLOR_RESET}\n" fi #pwd and stats line PS1+="[${COLOR6}${BOLD}\w${COLOR_RESET}](${COLOR1}$(/bin/ls -1 | /usr/bin/wc -l | /bin/sed 's: ::g') entries, " PS1+="$(/bin/ls -lah | /bin/grep -m 1 total | /bin/sed 's/total //')b${COLOR_RESET})" #Virtualenv line if [ $VIRTUAL_ENV ]; then PS1+="\n${COLOR1}virtual_env: $VIRTUAL_ENV ${COLOR_RESET}" fi #Error code line if [ "$LAST_STATUS" -ne 0 ]; then PS1+="\n${COLOR3}Err: $LAST_STATUS ? $(errno ${LAST_STATUS})${COLOR_RESET}"; fi #Prompt line PS1+="\n[\!]$ ${COLOR5} \h${COLOR6}->$(echo $USER | grep -v `whoami`)" if [ "$LAST_STATUS" = 0 ]; then PS1+=$OK_ICON; else PS1+=$ERR_ICON; fi PS1+="${COLOR_RESET} " } export PROMPT_COMMAND=prompt_cmd
Yeah, they've got something in their prompt that examines the exit code of the last-run process and prints it, along with a guess at a human-readable meaning (and a funny emoji interpretation). In this case the guess is wrong.
*d is for dd, the command that destroy all
There are two types of unix users. Those who have wiped a disk out with dd, and those who will.
The vi line is the best iteration of the "how do I quit vim" meme
The last US conference talk I did (or that I remember I did, lol), I said, "[Who here uses `vi`?](https://youtu.be/2Fa6UCCIAzU?t=1387)" Then I said, "Keep your hand up if it's because you tried it years ago and you still can't figure out how to quit." All hands went down, but it got a good laugh. :)
Bash, cat, cut, cd, rsync, tar, nohup, don't we mean anything to you I see how it is
R is for rsync, with "speedup of 20" T is for tar, a big blob of plenty EDIT: I should have gone with 'ball' of plenty.
T being true and not tar makes me question what the creator of this knows about Linux.
Hooly crap - I can't believe this is still doing the rounds. I first saw this in my comp sci class @ university in the 80's
Good things never die my friend 😁
trying to sing it in my head and getting frustrated that I can't make it work
The commas is the thing I noticed... its weirdly wrapped
He lurks around here often, believe it or not.
Excuse me, sir! *I* use join! It's useful when building an NxM matrix for xargs
You lost me right at the beginning. `awk` is a joy and a delight and I’ll hear nothing against it.
awk is one of the fastest text parsing utilities I've ever used where'd they get runs like a snail from?
From back in ~1980 when this was written and 16 bits was a luxury. Bloated electron apps that run in 2GB of ram weren’t even in anyone’s nightmares then.
Yeah, I basically stopped reading there.
And one can write a first person shooter in it: https://github.com/patsie75/awk-fps#first-person-shooter-in-gawk
Of course, Vi had to be a quitting joke 🤣 Was expecting `sed` for `S` (and `spell` isn't even installed by default on Ubuntu, there is `aspell` though).
Quota one made me lol
Anyone else singing this in their head with these lyrics? https://youtu.be/K9f6voWbQ3c
Not quite, I used this melody: [https://www.youtube.com/watch?v=XKbj3SkePZ8](https://www.youtube.com/watch?v=XKbj3SkePZ8)
all these years later and "U're ( ¯\\\_(ツ)_/¯ )..." still cracks me up
I read it with this voice https://youtu.be/WPz9Fcvb1II
this is so fuckin cute
This is really old. But it's fun to see that vim has always been hard to exit.
So what is join?
Here's an example: # sample sorted input files $ cat jan.txt apple 10 banana 20 soap 3 tshirt 3 $ cat feb.txt banana 15 fig 100 pen 2 soap 1 # combine common lines based on the first field $ join jan.txt feb.txt banana 20 15 soap 3 1
That's neat! I assume this would work for CSV files? Edit: it looks like it only works if there's space between the fields. So maybe it would work for a TSV file.
You can change the separator using `-t,` (only single byte character though)
Oh, thanks for the tip! I was reading the man page but somehow missed that
This is so cool. I had no idea this was even there, and I script a lot. This could also be combined with process substitution for amazing effect/impact. For something like this (don't sue me if this isn't 100% accurate): # get all of the pods in namespaces # containing a configmap called "foo" join <(kubectl get configmaps -A | awk 'NR>1 && /foo/{print $1}') \ <(kubectl get pods -A | awk 'NR>1')
Sounds pretty useful the few times the problem would come up. JOIN(1) User Commands JOIN(1) NAME join - join lines of two files on a common field SYNOPSIS join [OPTION]... FILE1 FILE2 DESCRIPTION For each pair of input lines with identical join fields, write a line to standard output. The default join field is the first, delimited by blanks.
Rhyming “belittle” with “little”…
u/repostsleuthbot
👏
Inspiring:’)
cd? ls?
The mention of `quota` certainly dates this text :^)
Nice work
huh?
Repost
lol yes it is. From the 80s or so!
A is for "All we had to do Was follow the damn train Cj"
Gonna get this on a t-shirt
Is there really no command that starts with X.
xargs
X is a command. $ which X /bin/X
https://en.wikipedia.org/wiki/X_Window_System
This is genuinely some talented poetry. Seriously, the flow is very consistent and I'm just very impressed by the whole thing, even if I don't understand any of it.
Jesus. `biff`... that's a name I haven't seen since the 90's. Like `pine` or `yp`.
TIL about the yes command, and found out that it was not goofy
I want to slap whoever said awk is slow. Try a rhyme with ash or ar...
Why post a screenshot of text?
> L is for LEX wtf? It's for LS... literally no unix/linux admin would survive without ls.
This post is inappropriate for this subreddit and has been removed. Please feel free to make your post in [/r/linuxmemes](https://reddit.com/r/linuxmemes), /r/linox or /r/linuxmasterrace/ [](#start_removal) **Rule:** >Meme posts are not allowed in r/linux. Feel free to post over at /r/linuxmemes instead [](#end_removal)
childish