Compare commits
3 commits
main
...
specify-fi
Author | SHA1 | Date | |
---|---|---|---|
348f59b44d | |||
dec2f6ff19 | |||
3902f5e3b7 |
8 changed files with 71 additions and 14 deletions
|
@ -1,7 +1,7 @@
|
||||||
So everything is just a pile of barely working code added on top\nof previously written barely working code. It keeps growing in\nsize and complexity, diminishing any chance for a change.\n\nTo have a healthy ecosystem you need to go back and revisit. You\nneed to occasionally throw stuff away and replace it with better\nstuff.\n\n - Nikita Tonsky, 2018-09-17\n blog post on tonsky.me\n ("Software Disenchantment")
|
So everything is just a pile of barely working code added\non top of previously written barely working code. It keeps\ngrowing in size and complexity, diminishing any chance for\na change.\n\nTo have a healthy ecosystem you need to go back and revisit.\nYou need to occasionally throw stuff away and replace it with\nbetter stuff.\n\n - Nikita Tonsky, 2018-09-17\n blog post on tonsky.me\n ("Software Disenchantment")
|
||||||
There's nothing more permanent than a temporary solution.
|
There's nothing more permanent than a temporary solution.
|
||||||
Unix is mature OS, windows is still in diapers and they smell badly\n\n - Rafael Skodlar <raffi@linwin.com>
|
Unix is mature OS, windows is still in diapers and they smell badly\n\n - Rafael Skodlar <raffi@linwin.com>
|
||||||
Hello Jeffrey,\n\nUnfortunately due to company policy, we are unable to offer\npositions to people with the name Jeffrey since it will not work\nwith our database schema\n\n - @yephph@twitter.com, 2020-04-12
|
Hello Jeffrey,\n\nUnfortunately due to company policy, we are unable to offer\npositions to people with the name Jeffrey since it will not work\nwith our database schema\n\n - @yephph, 2020-04-12 on Twitter
|
||||||
He's making a table\nSorting it twice\nHe's gonna `SELECT NAMES FROM CHILDREN WHERE BEHAVIOR = 'nice';`\nSanta Claus just learned SQL
|
He's making a table\nSorting it twice\nHe's gonna `SELECT NAMES FROM CHILDREN WHERE BEHAVIOR = 'nice';`\nSanta Claus just learned SQL
|
||||||
I don't know why, but first C programs tend to look a lot worse\nthan first programs in any other language (maybe except for fortran,\nbut then I suspect all fortran programs look like 'firsts')\n\n - Olaf Kirch
|
I don't know why, but first C programs tend to look a lot worse\nthan first programs in any other language (maybe except for fortran,\nbut then I suspect all fortran programs look like 'firsts')\n\n - Olaf Kirch
|
||||||
I'd crawl over an acre of 'Visual This++' and 'Integrated\nDevelopment That' to get to gcc, Emacs, and gdb. Thank you.\n\n - Vance Petree, Virginia Power
|
I'd crawl over an acre of 'Visual This++' and 'Integrated\nDevelopment That' to get to gcc, Emacs, and gdb. Thank you.\n\n - Vance Petree, Virginia Power
|
||||||
|
@ -10,4 +10,3 @@ With a GUI, that "undo" button is always an option. But in real\nlife, you can't
|
||||||
How do I type "for i in *.dvi do xdvi $i done" in a GUI?\n\n - Discussion in comp.os.linux.misc
|
How do I type "for i in *.dvi do xdvi $i done" in a GUI?\n\n - Discussion in comp.os.linux.misc
|
||||||
"If the code and the comments disagree, then both are probably wrong."\n\n - Norm Schryer
|
"If the code and the comments disagree, then both are probably wrong."\n\n - Norm Schryer
|
||||||
Your karma check for today:\nThere once was a user that whined\nHis existing OS was so blind\nHe'd do better to pirate\nAn OS that ran great\nBut found that his hardware declined.\nPlease don't steal Mac OS\nReally, that's way uncool.\n(C) Apple Computer, Inc.
|
Your karma check for today:\nThere once was a user that whined\nHis existing OS was so blind\nHe'd do better to pirate\nAn OS that ran great\nBut found that his hardware declined.\nPlease don't steal Mac OS\nReally, that's way uncool.\n(C) Apple Computer, Inc.
|
||||||
In 10 years we went from "Rust will never replace C and C++" to\n"New C/C++ should not be written anymore, and you should use\nRust." Good job.\n\n - dpc_pw on lobste.rs
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
......... Escape the 'Gates' of Hell\n `:::' ....... ......\n ::: * `::. ::'\n ::: .:: .:.::. .:: .:: `::. :'\n ::: :: :: :: :: :: :::.\n ::: .::. .:: ::. `::::. .:' ::.\n...:::.....................::' .::::..\n -- William E. Roadcap
|
......... Escape the 'Gates' of Hell\n `:::' ....... ......\n ::: * `::. ::'\n ::: .:: .:.::. .:: .:: `::. :'\n ::: :: :: :: :: :: :::.\n ::: .::. .:: ::. `::::. .:' ::.\n...:::.....................::' .::::..\n -- William E. Roadcap
|
||||||
Win95 is not a virus; a virus does something.
|
Win95 is not a virus; a virus does something.
|
||||||
In most countries selling harmful things like drugs is\npunishable. Then how come people can sell Microsoft software\nand go unpunished?\n\n - Hasse Skrifvars <hasku@rost.abo.fi>
|
In most countries selling harmful things like drugs is punishable.\nThen how come people can sell Microsoft software and go unpunished?\n\n - Hasse Skrifvars <hasku@rost.abo.fi>
|
||||||
Once upon a time there was a DOS user who saw Unix, and saw that\nit was good. After typing cp on his DOS machine at home, he\ndownloaded GNU's unix tools ported to DOS and installed them.\nHe rm'd, cp'd, and mv'd happily for many days, and upon finding\nelvis, he vi'd and was happy. After a long day at work (on a Unix\nbox) he came home, started editing a file, and couldn't figure\nout why he couldn't suspend vi (w/ ctrl-z) to do a compile.\n\n - Erik Troan <ewt@tipper.oit.unc.edu>
|
Once upon a time there was a DOS user who saw Unix, and saw that\nit was good. After typing cp on his DOS machine at home, he\ndownloaded GNU's unix tools ported to DOS and installed them.\nHe rm'd, cp'd, and mv'd happily for many days, and upon finding\nelvis, he vi'd and was happy. After a long day at work (on a Unix\nbox) he came home, started editing a file, and couldn't figure\nout why he couldn't suspend vi (w/ ctrl-z) to do a compile.\n\n - Erik Troan <ewt@tipper.oit.unc.edu>
|
||||||
When you say "I wrote a program that crashed Windows," people\njust stare at you blankly and say "Hey, I got those with the\nsystem, *for free*."\n\n - Linus Torvalds
|
When you say "I wrote a program that crashed Windows," people\njust stare at you blankly and say "Hey, I got those with the\nsystem, *for free*."\n\n - Linus Torvalds
|
||||||
By golly, I'm beginning to think Linux really *is* the best\nthing since sliced bread.\n\n - Vance Petree, Virginia Power
|
By golly, I'm beginning to think Linux really *is* the best thing\nsince sliced bread.\n\n - Vance Petree, Virginia Power
|
||||||
/*\n * [...] Note that 120 sec is defined in the protocol as the\n * maximum possible RTT. I guess we'll have to use something\n * other than TCP to talk to the University of Mars.\n * PAWS allows us longer timeouts and large windows, so once\n * implemented ftp to mars will work nicely\n */\n\n - /usr/src/linux/net/inet/tcp.c\n concerning round trip times
|
/*\n * [...] Note that 120 sec is defined in the protocol as the\n * maximum possible RTT. I guess we'll have to use something\n * other than TCP to talk to the University of Mars.\n * PAWS allows us longer timeouts and large windows, so once\n * implemented ftp to mars will work nicely\n */\n\n - /usr/src/linux/net/inet/tcp.c\n concerning round trip times
|
||||||
MSDOS didn't get as bad as it is overnight--it took over ten\nyears of careful development\n\n - <dmeggins@aix1.uottawa.ca>
|
MSDOS didn't get as bad as it is overnight--it took over ten\nyears of careful development\n\n - <dmeggins@aix1.uottawa.ca>
|
||||||
"No manual is ever necessary."\nMay I politely interject here: BULLSHIT. That's the biggest\nApple lie of all!\n\n - Discussion in comp.os.linux.misc
|
"No manual is ever necessary."\nMay I politely interject here: BULLSHIT. That's the biggest\nApple lie of all!\n\n - Discussion in comp.os.linux.misc
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
PLYADES I'll take care of you.\nORESTES It's rotten work.\nPLYADES Not to me. Not if it's you.\n\n - Anne Carson, Euripides
|
PLYADES I'll take care of you.\nORESTES It's rotten work.\nPLYADES Not to me. Not if it's you.\n\n - Anne Carson, Euripides
|
||||||
me: good night darling. I'm so happy to be able to fall asleep\nnext to you\n\nmy gf: *already rotating like a kebab to ensure maximum duvet\ntheft*\n\n - @davideastUK@twitter.com
|
me: good night darling. I'm so happy to be able to fall asleep\nnext to you\n\nmy gf: *already rotating like a kebab to ensure maximum duvet\ntheft*\n\n - @davideastUK, Twitter.
|
||||||
<sawasawako>\nidc anymore i think we should be a burden to each other\n\nand yes this includes a certain degree of tolerance for emotional\nburden, all else being equal. my love for you, and loyalty to\nyou, is not dependent on how easy you make it for me to love you.\ni don't value you for how little trouble you cause me. i want to\nlearn how to take you for who you are, instead of who i want you\nto be or who i think you should be\n\n<starrbear>\nThe measure of any relationship should not be whether loving\nsomeone is work, but whether it is work that you are glad to do.\n\n - tumblr exchange
|
<sawasawako>\nidc anymore i think we should be a burden to each other\n\nand yes this includes a certain degree of tolerance for emotional\nburden, all else being equal. my love for you, and loyalty to\nyou, is not dependent on how easy you make it for me to love you.\ni don't value you for how little trouble you cause me. i want to\nlearn how to take you for who you are, instead of who i want you\nto be or who i think you should be\n\n<starrbear>\nThe measure of any relationship should not be whether loving\nsomeone is work, but whether it is work that you are glad to do.\n\n - tumblr exchange
|
||||||
I want to eat the sunbeam flaring in your lovely body,\nthe sovereign nose of your arrogant face,\nI want to eat the fleeting shade of your lashes,\n - Pablo Neruda
|
I want to eat the sunbeam flaring in your lovel body,\nthe sovereign nose of your arrogant face,\nI want to eat the fleeting shade of your lashes,\n - Pablo Neruda
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
the distortion of "there is potential profit we did not earn" as\n"there is money we lost" is fascinating and disgusting to me.\n"megamediacongolmerate lost $1,000,000,000 to piracy this year"\nis a flat out lie. it is not true. they did not have a billion\ndollars, that they now do not have. they felt entitled to one\nbillion dollars, that they did not have, and still do not have.\nit's an infuriating perversion of the truth.\n\n - strawberry-bundae, tumblr post
|
the distortion of "there is potential profit we did not earn" as\n"there is money we lost" is fascinating and disgusting to me.\n"megamediacongolmerate lost $1,000,000,000 to piracy this year"\nis a flat out lie. it is not true. they did not have a billion\ndollars, that they now do not have. they felt entitled to one\nbillion dollars, that they did not have, and still do not have.\nit's an infuriating perversion of the truth.\n\n - strawberry-bundae, tumblr post
|
||||||
I'm tired of being the butt of everyone's jokes.\nI'm tired of being talked about like I'm not here.\nI'm tired of being a political token. Tired of being under\nscrutiny for no reason. Tired of being presumed guilty until\nproven innocent. Tired of being used as a cudgel to put down\nother trans people. I'm tired of having to constantly be on my\nbest behavior lest someone decide to ruin my life over some\ninsignificant slight. And I'm tired, most of all, because the\npeople who do all this stuff also surround themselves with legions\nof sycophants who'll constantly jerk them off about how good and\nwoke and progressive they are and about how the big scary\nhysterical ****** is just being mean for no reason.\n\nI'm tired. I just wanna play video games and read books about\nelves. I didn't sign up for whatever the fuck this is.\n\n - natalieironside, tumblr post.
|
I'm tired of being the butt of everyone's jokes.\nI'm tired of being talked about like I'm not here.\nI'm tired of being a political token. Tired of being under\nscrutiny for no reason. Tired of being presumed guilty until\nproven innocent. Tired of being used as a cudgel to put down\nother trans people. I'm tired of having to constantly be on my\nbest behavior lest someone decide to ruin my life over some\ninsignificant slight. And I'm tired, most of all, because the\npeople who do all this stuff also surround themselves with legions\nof sycophants who'll constantly jerk them off about how good and\nwoke and progressive they are and about how the big scary\nhysterical ****** is just being mean for no reason.\n\nI'm tired. I just wanna play video games and read books about\nelves. I didn't sign up for whatever the fuck this is.\n\n - natalieironside, tumblr post.
|
||||||
"The less you eat, drink and read books; the less you go to the theatre, the\ndance hall, the public-house; the less you think, love, theorize, paint, sing,\nfence, etc., the more you save—the greater becomes your treasure which neither\nmoths nor dust will devour—your capital. The less you are, the more you have;\nthe less you express your own life, the greater is your alienated life—the\ngreater is the store of your estranged being."\n\n - Karl Marx, Economic and Philosophic Manuscripts or 1844
|
> The less you eat, drink and read books; the less you go to the\n> theatre, the dance hall, the public-house; the less you think,\n> love, theorize, paint, sing, fence, etc., the more you save—the\n> greater becomes your treasure which neither moths nor dust will\n> devour—your capital. The less you are, the more you have; the\n> less you express your own life, the greater is your alienated\n> life—the greater is the store of your estranged being.\n\n - Karl Marx, Economic and Philosophic Manuscripts or 1844
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
[38;2;229;0;0m█████████████████████\n[38;2;255;141;0m█████████████████████\n[38;2;255;238;0m█████████████████████\n[38;2;2;129;33m█████████████████████\n[38;2;0;76;255m█████████████████████\n[38;2;119;0;136m█████████████████████[39m
|
[38;2;229;0;0m█████████████████████\n[38;2;255;141;0m█████████████████████\n[38;2;255;238;0m█████████████████████\n[38;2;2;129;33m█████████████████████\n[38;2;0;76;255m█████████████████████\n[38;2;119;0;136m█████████████████████[39m
|
||||||
[38;2;122;203;245m██████████████████\n[38;2;234;172;184m██████████████████\n[38;2;255;255;255m██████████████████\n[38;2;234;172;184m██████████████████\n[38;2;122;203;245m██████████████████[39m
|
[38;2;122;203;245m██████████████████\n[38;2;234;172;184m██████████████████\n[38;2;255;255;255m██████████████████\n[38;2;234;172;184m██████████████████\n[38;2;122;203;245m██████████████████[39m
|
||||||
[39m[38;2;122;203;245m[48;2;97;57;21m[38;2;97;57;21m[48;2;0;0;0m[38;2;0;0;0m[48;2;229;0;0m[49m[38;2;229;0;0m██████████████████\n[38;2;234;172;184m[48;2;122;203;245m[38;2;122;203;245m[48;2;97;57;21m[38;2;97;57;21m[48;2;0;0;0m[38;2;0;0;0m[48;2;255;141;0m[49m[38;2;255;141;0m█████████████████\n[38;2;255;255;255m[48;2;234;172;184m[38;2;234;172;184m[48;2;122;203;245m[38;2;122;203;245m[48;2;97;57;21m[38;2;97;57;21m[48;2;0;0;0m[38;2;0;0;0m[48;2;255;238;0m[49m[38;2;255;238;0m████████████████\n[38;2;255;255;255m[48;2;234;172;184m[38;2;234;172;184m[48;2;122;203;245m[38;2;122;203;245m[48;2;97;57;21m[38;2;97;57;21m[48;2;0;0;0m[38;2;0;0;0m[48;2;2;129;33m[49m[38;2;2;129;33m████████████████\n[38;2;234;172;184m[48;2;122;203;245m[38;2;122;203;245m[48;2;97;57;21m[38;2;97;57;21m[48;2;0;0;0m[38;2;0;0;0m[48;2;0;76;255m[49m[38;2;0;76;255m█████████████████\n[38;2;122;203;245m[48;2;97;57;21m[38;2;97;57;21m[48;2;0;0;0m[38;2;0;0;0m[48;2;119;0;136m[49m[38;2;119;0;136m██████████████████[39m
|
[39m[38;2;122;203;245m[48;2;97;57;21m[38;2;97;57;21m[48;2;0;0;0m[38;2;0;0;0m[48;2;229;0;0m[49m[38;2;229;0;0m██████████████████\n[38;2;234;172;184m[48;2;122;203;245m[38;2;122;203;245m[48;2;97;57;21m[38;2;97;57;21m[48;2;0;0;0m[38;2;0;0;0m[48;2;255;141;0m[49m[38;2;255;141;0m█████████████████\n[38;2;255;255;255m[48;2;234;172;184m[38;2;234;172;184m[48;2;122;203;245m[38;2;122;203;245m[48;2;97;57;21m[38;2;97;57;21m[48;2;0;0;0m[38;2;0;0;0m[48;2;255;238;0m[49m[38;2;255;238;0m████████████████\n[38;2;255;255;255m[48;2;234;172;184m[38;2;234;172;184m[48;2;122;203;245m[38;2;122;203;245m[48;2;97;57;21m[38;2;97;57;21m[48;2;0;0;0m[38;2;0;0;0m[48;2;2;129;33m[49m[38;2;2;129;33m████████████████\n[38;2;234;172;184m[48;2;122;203;245m[38;2;122;203;245m[48;2;97;57;21m[38;2;97;57;21m[48;2;0;0;0m[38;2;0;0;0m[48;2;0;76;255m[49m[38;2;0;76;255m█████████████████\n[38;2;122;203;245m[48;2;97;57;21m[38;2;97;57;21m[48;2;0;0;0m[38;2;0;0;0m[48;2;119;0;136m[49m[38;2;119;0;136m██████████████████[39m
|
||||||
|
BE GAY DO CRIME!
|
||||||
"Can you write in it that I said thank you to gay people"\n\n - Gianni Matragrano, ULTRAKILL credits
|
"Can you write in it that I said thank you to gay people"\n\n - Gianni Matragrano, ULTRAKILL credits
|
||||||
> I'd like to see the gay revolution get started... If a\n> transvestite doesn't say "I'm gay and I'm proud and I'm a\n> transvestite," then nobody else is going to hop up there and\n> say "I'm gay and I'm proud and I'm a transvestite" for them.\n\n - Marsha P Johnson, Stonewall Rioter
|
> I'd like to see the gay revolution get started... If a\n> transvestite doesn't say "I'm gay and I'm proud and I'm a\n> transvestite," then nobody else is going to hop up there and\n> say "I'm gay and I'm proud and I'm a transvestite" for them.\n\n - Marsha P Johnson, Stonewall Rioter
|
||||||
"No pride for some of us without liberation for all of us."\n\n - Marsha P Johnson, Stonewall Rioter
|
"No pride for some of us without liberation for all of us."\n\n - Marsha P Johnson, Stonewall Rioter
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
When I kill God I will find the spigot from which he meters out\ngrace and smash it permanently open\n\n - @Iinux@twitter.com, 2022-06-12
|
When I kill God I will find the spigot from which he meters out\ngrace and smash it permanently open\n\n - @Iinux@twitter.com, 2022-06-12
|
||||||
> TikTok is out of the question because, "I have a reprehensible\n> visage that does not allow me to use any video-based apps," he\n> said.\n\n - Dril, 2022-11-23\n interview with the Washington Post
|
> TikTok is out of the question because, "I have a reprehensible\n> visage that does not allow me to use any video-based apps," he\n> said.\n\n - Dril, 2022-11-23\n interview with the Washington Post
|
||||||
An ant crosses your carpet. A spider weaves a pattern older than\nmammals beneath your stairs. Just nod, breathe, and think,\n"Good. It's all still here. The forest, the mountains, the\ndesert. At home in my home." The sterile white box is the\nstranger. Not the ant. Not the spider.\n\n - @CryptoNature@twitter.com, 2018-27-08
|
An ant crosses your carpet. A spider weaves a pattern older than mammals beneath your stairs. Just nod, breathe, and think, "Good. It's all still here. The forest, the mountains, the desert. At home in my home." The sterile white box is the stranger. Not the ant. Not the spider.\n\n - @CryptoNature@twitter.com, 2018-27-08
|
|
@ -2,8 +2,34 @@ using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
|
|
||||||
|
// get resource path from var or default
|
||||||
|
string resourcePath = Environment.GetEnvironmentVariable("FORTUNE_CS_DIR");
|
||||||
|
if(resourcePath == "" || !Directory.Exists(resourcePath))
|
||||||
|
resourcePath = "/usr/share/fortune-cs/";
|
||||||
|
|
||||||
|
// pull file arg if 1 argument is provided
|
||||||
|
string file = null;
|
||||||
|
if(args.Length == 1) {
|
||||||
|
file = args[0];
|
||||||
|
// if the file doens't exist, see if it's in `resourcePath`
|
||||||
|
if(!File.Exists(file)) {
|
||||||
|
if(!file.EndsWith(".txt"))
|
||||||
|
file = file + ".txt";
|
||||||
|
file = resourcePath + file;
|
||||||
|
if(!File.Exists(file)) {
|
||||||
|
// don't try to read a file that doesn't exist
|
||||||
|
Console.WriteLine($"fortune-cs: no file '{file}' found.");
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// run merge if more than 1 argument is provided
|
||||||
|
else if(args.Length > 0) {
|
||||||
|
Utilities.Merge(args);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// make sure fortune directory exists
|
// make sure fortune directory exists
|
||||||
var resourcePath = "/usr/share/fortune-cs/";
|
|
||||||
if(!Directory.Exists(resourcePath)) {
|
if(!Directory.Exists(resourcePath)) {
|
||||||
Console.WriteLine("fortune-cs: directory '/usr/share/fortune-cs/' does not exist");
|
Console.WriteLine("fortune-cs: directory '/usr/share/fortune-cs/' does not exist");
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -12,15 +38,17 @@ if(!Directory.Exists(resourcePath)) {
|
||||||
// pull file list
|
// pull file list
|
||||||
var files = Directory.GetFiles(resourcePath, "*.txt");
|
var files = Directory.GetFiles(resourcePath, "*.txt");
|
||||||
|
|
||||||
// choose a file and line
|
// choose file if no arg provided
|
||||||
var file = files[RandomNumberGenerator.GetInt32(files.Length)];
|
if(file == null)
|
||||||
|
file = files[RandomNumberGenerator.GetInt32(files.Length)];
|
||||||
|
// read the file and choose a line
|
||||||
var lines = File.ReadAllLines(file);
|
var lines = File.ReadAllLines(file);
|
||||||
var line = lines[RandomNumberGenerator.GetInt32(lines.Length)];
|
var line = lines[RandomNumberGenerator.GetInt32(lines.Length)];
|
||||||
|
|
||||||
// process escape codes
|
// process line breaks
|
||||||
line = line.Replace("\\n", "\n");
|
line = line.Replace("\\n", "\n");
|
||||||
|
|
||||||
// write
|
// write the fortune
|
||||||
Console.WriteLine(line);
|
Console.WriteLine(line);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
29
src/Util.cs
Normal file
29
src/Util.cs
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
public static class Utilities {
|
||||||
|
|
||||||
|
public static void Merge(params string[] files) {
|
||||||
|
// hashset to prevent duplicates
|
||||||
|
var members = new HashSet<string>();
|
||||||
|
// iterate over all paths given
|
||||||
|
foreach(var file in files) {
|
||||||
|
// skip nonexistent files gracefully
|
||||||
|
if(!File.Exists(file))
|
||||||
|
continue;
|
||||||
|
// iterate over lines
|
||||||
|
var lines = File.ReadAllLines(file);
|
||||||
|
foreach(var line in lines) {
|
||||||
|
// prevent duplicates
|
||||||
|
if(members.Contains(line))
|
||||||
|
continue;
|
||||||
|
members.Add(line);
|
||||||
|
// emit to stdout
|
||||||
|
Console.WriteLine(line);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue