-
Notifications
You must be signed in to change notification settings - Fork 1
/
bam.sh
executable file
·44 lines (28 loc) · 16.7 KB
/
bam.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh
bam() {
random_adjective() {
adjectives="aback,abaft,abandoned,abashed,aberrant,abhorrent,abiding,abject,ablaze,able,abnormal,aboard,aboriginal,abortive,abounding,abrasive,abrupt,absent,absolute,absorbed,absorbing,abstracted,absurd,abundant,abusive,academic,acceptable,accessible,accidental,acclaimed,accomplished,accurate,aching,acid,acidic,acoustic,acrid,acrobatic,active,actual,actually,adamant,adaptable,addicted,adept,adhesive,adjoining,admirable,admired,adolescent,adorable,adored,advanced,adventurous,affectionate,afraid,aged,aggravating,aggressive,agile,agitated,agonizing,agreeable,ahead,ajar,alarmed,alarming,alcoholic,alert,alienated,alike,alive,all,alleged,alluring,aloof,altruistic,amazing,ambiguous,ambitious,amiable,ample,amuck,amused,amusing,anchored,ancient,ancient,angelic,angry,angry,anguished,animated,annoyed,annoying,annual,another,antique,antsy,anxious,any,apathetic,appetizing,apprehensive,appropriate,apt,aquatic,arctic,arid,aromatic,arrogant,artistic,ashamed,aspiring,assorted,assured,astonishing,athletic,attached,attentive,attractive,auspicious,austere,authentic,authorized,automatic,available,avaricious,average,awake,aware,awesome,awful,awkward,axiomatic,babyish,back,bad,baggy,barbarous,bare,barren,bashful,basic,batty,bawdy,beautiful,beefy,befitting,belated,belligerent,beloved,beneficial,bent,berserk,best,better,bewildered,bewitched,big,big-hearted,billowy,biodegradable,bite-sized,biting,bitter,bizarre,black,black-and-white,bland,blank,blaring,bleak,blind,blissful,blond,bloody,blue,blue-eyed,blushing,bogus,boiling,bold,bony,boorish,bored,boring,bossy,both,bouncy,boundless,bountiful,bowed,brainy,brash,brave,brawny,breakable,breezy,brief,bright,brilliant,brisk,broad,broken,bronze,brown,bruised,bubbly,bulky,bumpy,buoyant,burdensome,burly,bustling,busy,buttery,buzzing,cagey,calculating,callous,calm,candid,canine,capable,capital,capricious,carefree,careful,careless,caring,cautious,cavernous,ceaseless,celebrated,certain,changeable,charming,cheap,cheeky,cheerful,cheery,chemical,chief,childlike,chilly,chivalrous,chubby,chunky,circular,clammy,classic,classy,clean,clear,clear-cut,clever,cloistered,close,closed,cloudy,clueless,clumsy,cluttered,coarse,coherent,cold,colorful,colorless,colossal,colossal,combative,comfortable,common,compassionate,competent,complete,complex,complicated,composed,concerned,concrete,condemned,condescending,confused,conscious,considerate,constant,contemplative,content,conventional,convincing,convoluted,cooing,cooked,cool,cooperative,coordinated,corny,corrupt,costly,courageous,courteous,cowardly,crabby,crafty,craven,crazy,creamy,creative,creepy,criminal,crisp,critical,crooked,crowded,cruel,crushing,cuddly,cultivated,cultured,cumbersome,curious,curly,curved,curvy,cut,cute,cylindrical,cynical,daffy,daily,damaged,damaging,damp,dangerous,dapper,dapper,daring,dark,darling,dashing,dazzling,dead,deadly,deadpan,deafening,dear,dearest,debonair,decayed,deceitful,decent,decimal,decisive,decorous,deep,deeply,defeated,defective,defenseless,defensive,defiant,deficient,definite,delayed,delectable,delicate,delicious,delightful,delirious,demanding,demonic,dense,dental,dependable,dependent,depraved,depressed,deranged,descriptive,deserted,despicable,detailed,determined,devilish,devoted,didactic,different,difficult,digital,dilapidated,diligent,dim,diminutive,dimpled,dimwitted,direct,direful,dirty,disagreeable,disastrous,discreet,discrete,disfigured,disguised,disgusted,disgusting,dishonest,disillusioned,disloyal,dismal,dispensable,distant,distinct,distorted,distraught,distressed,disturbed,divergent,dizzy,domineering,dopey,doting,double,doubtful,downright,drab,draconian,drafty,drained,dramatic,dreary,droopy,drunk,dry,dual,dull,dull,dusty,dutiful,dynamic,dysfunctional,each,eager,early,earnest,earsplitting,earthy,easy,easy-going,eatable,economic,ecstatic,edible,educated,efficacious,efficient,eight,elaborate,elastic,elated,elderly,electric,elegant,elementary,elfin,elite,elliptical,emaciated,embarrassed,embellished,eminent,emotional,empty,enchanted,enchanting,encouraging,endurable,energetic,enlightened,enormous,enraged,entertaining,enthusiastic,entire,envious,envious,equable,equal,equatorial,erect,erratic,essential,esteemed,ethereal,ethical,euphoric,evanescent,evasive,even,evergreen,everlasting,every,evil,exalted,exasperated,excellent,excitable,excited,exciting,exclusive,exemplary,exhausted,exhilarated,exotic,expensive,experienced,expert,extensive,extra-large,extraneous,extra-small,extroverted,exuberant,exultant,fabulous,faded,failing,faint,fair,faithful,fake,fallacious,false,familiar,famous,fanatical,fancy,fantastic,far,faraway,far-flung,far-off,fascinated,fast,fat,fatal,fatherly,faulty,favorable,favorite,fearful,fearless,feeble,feigned,feisty,feline,female,feminine,fertile,festive,few,fickle,fierce,filthy,fine,finicky,finished,firm,first,firsthand,fitting,five,fixed,flagrant,flaky,flamboyant,flashy,flat,flawed,flawless,flickering,flimsy,flippant,floppy,flowery,flufy,fluid,flustered,fluttering,foamy,focused,fond,foolhardy,foolish,forceful,foregoing,forgetful,forked,formal,forsaken,forthright,fortunate,four,fragile,fragrant,frail,frank,frantic,frayed,free,freezing,french,frequent,fresh,fretful,friendly,frightened,frightening,frigid,frilly,frivolous,frizzy,front,frosty,frothy,frozen,frugal,fruitful,frustrating,full,fumbling,fumbling,functional,funny,furry,furtive,fussy,future,futuristic,fuzzy,gabby,gainful,gamy,gaping,gargantuan,garrulous,gaseous,gaudy,general,general,generous,gentle,genuine,ghastly,giant,giddy,gifted,gigantic,giving,glamorous,glaring,glass,gleaming,gleeful,glib,glistening,glittering,gloomy,glorious,glossy,glum,godly,golden,good,good-natured,goofy,gorgeous,graceful,gracious,grand,grandiose,grandiose,granular,grateful,gratis,grave,gray,greasy,great,greedy,green,gregarious,grey,grieving,grim,grimy,gripping,grizzled,groovy,gross,grotesque,grouchy,grounded,growing,growling,grown,grubby,gruesome,grumpy,guarded,guiltless,guilty,gullible,gummy,gusty,guttural,habitual,hairy,half,half,hallowed,halting,handmade,handsome,handsomely,handy,hanging,hapless,happy,happy-go-lucky,hard,hard-to-find,harebrained,harmful,harmless,harmonious,harsh,hasty,hateful,haunting,heady,healthy,heartbreaking,heartfelt,hearty,heavenly,heavy,hefty,hellish,helpful,helpless,hesitant,hidden,hideous,high,highfalutin,high-level,high-pitched,hilarious,hissing,historical,hoarse,holistic,hollow,homeless,homely,honest,honorable,honored,hopeful,horrible,horrific,hospitable,hot,huge,hulking,humble,humdrum,humiliating,humming,humongous,humorous,hungry,hurried,hurt,hurtful,hushed,husky,hypnotic,hysterical,icky,icy,ideal,ideal,idealistic,identical,idiotic,idle,idolized,ignorant,ill,illegal,ill-fated,ill-informed,illiterate,illustrious,imaginary,imaginative,immaculate,immaterial,immediate,immense,imminent,impartial,impassioned,impeccable,imperfect,imperturbable,impish,impolite,important,imported,impossible,impractical,impressionable,impressive,improbable,impure,inborn,incandescent,incomparable,incompatible,incompetent,incomplete,inconclusive,inconsequential,incredible,indelible,indolent,industrious,inexpensive,inexperienced,infamous,infantile,infatuated,inferior,infinite,informal,innate,innocent,inquisitive,insecure,insidious,insignificant,insistent,instinctive,instructive,insubstantial,intelligent,intent,intentional,interesting,internal,international,intrepid,intrigued,invincible,irate,ironclad,irresponsible,irritable,irritating,itchy,jaded,jagged,jam-packed,jaunty,jazzy,jealous,jittery,jobless,joint,jolly,jovial,joyful,joyous,jubilant,judicious,juicy,jumbled,jumbo,jumpy,jumpy,junior,juvenile,kaleidoscopic,kaput,keen,key,kind,kindhearted,kindly,klutzy,knobby,knotty,knowing,knowledgeable,known,kooky,kosher,labored,lackadaisical,lacking,lame,lame,lamentable,languid,lanky,large,last,lasting,late,laughable,lavish,lawful,lazy,leading,leafy,lean,learned,left,legal,legitimate,lethal,level,lewd,light,lighthearted,likable,like,likeable,likely,limited,limp,limping,linear,lined,liquid,literate,little,live,lively,livid,living,loathsome,lone,lonely,long,longing,long-term,loose,lopsided,lost,loud,loutish,lovable,lovely,loving,low,lowly,loyal,lucky,ludicrous,lumbering,luminous,lumpy,lush,lustrous,luxuriant,luxurious,lying,lyrical,macabre,macho,mad,maddening,made-up,madly,magenta,magical,magnificent,majestic,major,makeshift,male,malicious,mammoth,maniacal,many,marked,married,marvelous,masculine,massive,material,materialistic,mature,meager,mealy,mean,measly,meaty,medical,mediocre,medium,meek,melancholy,mellow,melodic,melted,memorable,menacing,merciful,mere,merry,messy,metallic,mighty,mild,military,milky,mindless,miniature,minor,minty,minute,miscreant,miserable,miserly,misguided,mistaken,misty,mixed,moaning,modern,modest,moist,moldy,momentous,monstrous,monthly,monumental,moody,moral,mortified,motherly,motionless,mountainous,muddled,muddy,muffled,multicolored,mundane,mundane,murky,mushy,musty,mute,muted,mysterious,naive,nappy,narrow,nasty,natural,naughty,nauseating,nautical,near,neat,nebulous,necessary,needless,needy,negative,neglected,negligible,neighboring,neighborly,nervous,nervous,new,next,nice,nice,nifty,nimble,nine,nippy,nocturnal,noiseless,noisy,nonchalant,nondescript,nonsensical,nonstop,normal,nostalgic,nosy,notable,noted,noteworthy,novel,noxious,null,numb,numberless,numerous,nutritious,nutty,oafish,obedient,obeisant,obese,oblivious,oblong,obnoxious,obscene,obsequious,observant,obsolete,obtainable,obvious,occasional,oceanic,odd,oddball,offbeat,offensive,official,oily,old,old-fashioned,omniscient,one,onerous,only,open,opposite,optimal,optimistic,opulent,orange,orderly,ordinary,organic,original,ornate,ornery,ossified,other,our,outgoing,outlandish,outlying,outrageous,outstanding,oval,overconfident,overcooked,overdue,overjoyed,overlooked,overrated,overt,overwrought,painful,painstaking,palatable,pale,paltry,panicky,panoramic,parallel,parched,parsimonious,partial,passionate,past,pastel,pastoral,pathetic,peaceful,penitent,peppery,perfect,perfumed,periodic,perky,permissible,perpetual,perplexed,personal,pertinent,pesky,pessimistic,petite,petty,petty,phobic,phony,physical,picayune,piercing,pink,piquant,pitiful,placid,plain,plaintive,plant,plastic,plausible,playful,pleasant,pleased,pleasing,plucky,plump,plush,pointed,pointless,poised,polished,polite,political,pompous,poor,popular,portly,posh,positive,possessive,possible,potable,powerful,powerless,practical,precious,premium,present,present,prestigious,pretty,previous,pricey,prickly,primary,prime,pristine,private,prize,probable,productive,profitable,profuse,proper,protective,proud,prudent,psychedelic,psychotic,public,puffy,pumped,punctual,pungent,puny,pure,purple,purring,pushy,pushy,putrid,puzzled,puzzling,quack,quaint,quaint,qualified,quarrelsome,quarterly,queasy,querulous,questionable,quick,quickest,quick-witted,quiet,quintessential,quirky,quixotic,quixotic,quizzical,rabid,racial,radiant,ragged,rainy,rambunctious,rampant,rapid,rare,rash,raspy,ratty,raw,ready,real,realistic,reasonable,rebel,recent,receptive,reckless,recondite,rectangular,red,redundant,reflecting,reflective,regal,regular,reliable,relieved,remarkable,reminiscent,remorseful,remote,repentant,repulsive,required,resolute,resonant,respectful,responsible,responsive,revolving,rewarding,rhetorical,rich,right,righteous,rightful,rigid,ringed,ripe,ritzy,roasted,robust,romantic,roomy,rosy,rotating,rotten,rotund,rough,round,rowdy,royal,rubbery,ruddy,rude,rundown,runny,rural,rustic,rusty,ruthless,sable,sad,safe,salty,same,sandy,sane,sarcastic,sardonic,sassy,satisfied,satisfying,savory,scaly,scandalous,scant,scarce,scared,scary,scattered,scented,scholarly,scientific,scintillating,scornful,scratchy,scrawny,screeching,second,secondary,second-hand,secret,secretive,sedate,seemly,selective,self-assured,selfish,self-reliant,sentimental,separate,serene,serious,serpentine,several,severe,shabby,shadowy,shady,shaggy,shaky,shallow,shameful,shameless,sharp,shimmering,shiny,shivering,shocked,shocking,shoddy,short,short-term,showy,shrill,shut,shy,sick,silent,silky,silly,silver,similar,simple,simplistic,sincere,sinful,single,six,sizzling,skeletal,skillful,skinny,sleepy,slight,slim,slimy,slippery,sloppy,slow,slushy,small,smarmy,smart,smelly,smiling,smoggy,smooth,smug,snappy,snarling,sneaky,sniveling,snobbish,snoopy,snotty,sociable,soft,soggy,solid,somber,some,sophisticated,sordid,sore,sorrowful,soulful,soupy,sour,sour,spanish,sparkling,sparse,special,specific,spectacular,speedy,spherical,spicy,spiffy,spiky,spirited,spiritual,spiteful,splendid,spooky,spotless,spotted,spotty,spry,spurious,squalid,square,squeaky,squealing,squeamish,squiggly,stable,staid,stained,staking,stale,standard,standing,starchy,stark,starry,statuesque,steadfast,steady,steel,steep,stereotyped,sticky,stiff,stimulating,stingy,stormy,stout,straight,strange,strict,strident,striking,striped,strong,studious,stunning,stunning,stupendous,stupid,sturdy,stylish,subdued,submissive,subsequent,substantial,subtle,suburban,successful,succinct,succulent,sudden,sugary,sulky,sunny,super,superb,superficial,superior,supportive,supreme,sure-footed,surprised,suspicious,svelte,swanky,sweaty,sweet,sweltering,swift,sympathetic,symptomatic,synonymous,taboo,tacit,tacky,talented,talkative,tall,tame,tan,tangible,tangy,tart,tasteful,tasteless,tasty,tattered,taut,tawdry,tearful,tedious,teeming,teeny,teeny-tiny,telling,temporary,tempting,ten,tender,tense,tenuous,tepid,terrible,terrific,tested,testy,thankful,that,therapeutic,these,thick,thin,thinkable,third,thirsty,this,thorny,thorough,those,thoughtful,thoughtless,threadbare,threatening,three,thrifty,thundering,thunderous,tidy,tight,tightfisted,timely,tinted,tiny,tired,tiresome,toothsome,torn,torpid,total,tough,towering,tragic,trained,tranquil,trashy,traumatic,treasured,tremendous,triangular,tricky,trifling,trim,trite,trivial,troubled,truculent,true,trusting,trustworthy,trusty,truthful,tubby,turbulent,twin,two,typical,ubiquitous,ugliest,ugly,ultimate,ultra,unable,unaccountable,unarmed,unaware,unbecoming,unbiased,uncomfortable,uncommon,unconscious,uncovered,understated,understood,undesirable,unequal,unequaled,uneven,unfinished,unfit,unfolded,unfortunate,unhappy,unhealthy,uniform,unimportant,uninterested,unique,united,unkempt,unknown,unlawful,unlined,unlucky,unnatural,unpleasant,unrealistic,unripe,unruly,unselfish,unsightly,unsteady,unsuitable,unsung,untidy,untimely,untried,untrue,unused,unusual,unwelcome,unwieldy,unwitting,unwritten,upbeat,uppity,upright,upset,uptight,urban,usable,used,used,useful,useless,utilized,utopian,utter,uttermost,vacant,vacuous,vagabond,vague,vain,valid,valuable,vapid,variable,various,vast,velvety,venerated,vengeful,venomous,verdant,verifiable,versed,vexed,vibrant,vicious,victorious,vigilant,vigorous,villainous,violent,violet,virtual,virtuous,visible,vital,vivacious,vivid,voiceless,volatile,voluminous,voracious,vulgar,wacky,waggish,waiting,wakeful,wan,wandering,wanting,warlike,warm,warmhearted,warped,wary,wasteful,watchful,waterlogged,watery,wavy,weak,wealthy,weary,webbed,wee,weekly,weepy,weighty,weird,welcome,well-documented,well-groomed,well-informed,well-lit,well-made,well-off,well-to-do,well-worn,wet,which,whimsical,whirlwind,whispered,whispering,white,whole,wholesale,whopping,wicked,wide,wide-eyed,wiggly,wild,willing,wilted,winding,windy,winged,wiry,wise,wistful,witty,wobbly,woebegone,woeful,womanly,wonderful,wooden,woozy,wordy,workable,worldly,worn,worried,worrisome,worse,worst,worthless,worthwhile,worthy,wrathful,wretched,writhing,wrong,wry,xenophobic,yawning,yearly,yellow,yellowish,yielding,young,youthful,yummy,zany,zealous,zesty,zigzag,zippy,zonked"
INDEX=$(echo "$adjectives" | awk 'BEGIN { FS = ","; srand(); } ; { print int(rand() * NF) }')
echo "$adjectives" | awk 'BEGIN { FS = ","; srand(); } ; { print $'"$INDEX"' }'
}
random_noun() {
nouns="apple,arm,ball,banana,bat,bed,bike,bird,book,book,boy,bun,cake,can,cap,car,cat,chin,clam,class,clover,club,corn,cow,crayon,crib,crow,crowd,crown,cub,cup,dad,day,desk,dime,dirt,dog,doll,dress,dust,fan,fang,feet,field,flag,flower,fog,game,girl,gun,hall,hat,heat,hen,hill,home,horn,hose,jar,joke,juice,kite,kite,lake,maid,man,map,mask,meal,meat,men,mice,milk,mint,mom,moon,morning,mother,name,nest,nose,pan,pear,pen,pencil,pet,pie,pig,plant,pot,rain,rat,river,road,rock,room,rose,seed,shape,shoe,shop,show,sink,snail,snake,snow,soda,sofa,son,star,step,stew,stove,straw,string,summer,sun,swing,table,tank,team,tent,test,toe,toes,tree,tub,van,vest,water,wing,winter,woman,women"
INDEX=$(echo "$nouns" | awk 'BEGIN { FS = ","; srand(); } ; { print int(rand() * NF) }')
echo "$nouns" | awk 'BEGIN { FS = ","; srand(); } ; { print $'"$INDEX"' }'
}
dateStr=$(date '+%A-%d-%h-%Y')
if [ $1 ]; then
newBamDir="$BAM_DIR/$dateStr/$1"
test -d $newBamDir && echo "Already exists: $newBamDir" >&2 && return 1
else
while true; do
adjective=$(random_adjective);
noun=$(random_noun);
newBam="$adjective-$noun"
newBamDir="$BAM_DIR/$dateStr/$newBam"
test -d $newBamDir || break
done
fi
mkdir -p $newBamDir
cd $newBamDir
}