How to Find, Sort by Size, and Export with BashHow sort find result by file sizesGet the source directory of a Bash script from within the script itselfHow to check if a string contains a substring in BashHow to check if a program exists from a Bash script?How do I sort a dictionary by value?How do I tell if a regular file does not exist in Bash?How do I split a string on a delimiter in Bash?Extract filename and extension in BashSort array of objects by string property valueHow to concatenate string variables in BashHow to pair socks from a pile efficiently?

Getting an entry level IT position later in life

Is a switch from R to Python worth it?

Can you use the Help action to give a 2019 UA Artillerist artificer's turret advantage?

Is there a drawback to Flail Snail's Shell defense?

Is C++20 'char8_t' the same as our old 'char'?

Looking for a new job because of relocation - is it okay to tell the real reason?

Why don't the open notes matter in guitar chords?

Probably terminated or laid off soon; confront or not?

Where in ש״ס who one find the adage, “He who suggests the idea should carry it out”?

How many years before enough atoms of your body are replaced to survive the sudden disappearance of the original body’s atoms?

Best way to explain to my boss that I cannot attend a team summit because it is on Rosh Hashana or any other Jewish Holiday

Why is there a need to prevent a racist, or homophobic, etc. vendor from discriminating who they sell to?

Why should public servants be apolitical?

Decode a variable-length quantity

Why does putting a dot after the URL remove login information?

How to halve redstone signal strength?

Why is Chromosome 1 called Chromosome 1?

Is Odin inconsistent about the powers of Mjolnir?

Does the United States guarantee any unique freedoms?

How do these cubesats' whip antennas work?

"How do you solve a problem like Maria?"

Print only the last three columns from file

Secure my password from unsafe servers

I was contacted by a private bank overseas to get my inheritance



How to Find, Sort by Size, and Export with Bash


How sort find result by file sizesGet the source directory of a Bash script from within the script itselfHow to check if a string contains a substring in BashHow to check if a program exists from a Bash script?How do I sort a dictionary by value?How do I tell if a regular file does not exist in Bash?How do I split a string on a delimiter in Bash?Extract filename and extension in BashSort array of objects by string property valueHow to concatenate string variables in BashHow to pair socks from a pile efficiently?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I'm attempting to use Bash to find all of the text files on my hard drive, sort them according to size, and export a CSV list of their paths.



This is similar to a few other threads on SO. Probably most closely to this: How sort find result by file sizes



But there are a few variations on the previously suggested code that I don't quite understand.



This line allows me to search by file type and export the results as path names, but I am unclear about how to combine this with the other necessary functions (namely, sorting path names by size ).



find / -type f -name '*.txt' > ~/Desktop/sorted.csv


I am doing this on MacOS and I am new to Bash, so the solution so far has been difficult to ascertain.



edit:
Using bits of other code, I was able to piece this together. From what I understand, the "find" command finds all files with a txt extension and prints a full list of the file information, with path. "sort" picks the 5th "field", which is (always?) the file size, and sorts the information accordingly. "awk" is then used to print fields 9 through 13...which is a problem. this is printing bits and pieces of the path, potentially because each bit of the path occupies its own field at this point.



find / -type f -name '*.txt' -exec ls -al ;|sort -k 5 -n| awk ' print $9, $10, $11, $12, $13 ' > ~/Desktop/sorts/sorted.txt


Just to add one last addition, thanks to RobC's comments:
I would like the final CSV file to simply be a list of the sorted paths. Filesize no longer included. Ascending/Descending is not important.










share|improve this question


























  • benlat, welcome to SO. Can edit your question to show the community an example of how you want your resultant csv file to be formatted. Do you want filepaths be sorted in ascending or descending order by file size? Do you want the resultant .csv file to include both the filepath and its corresponding filesize, or just sorted filepaths only. If you do want filesize reported in the .csv file too, how do you want the filesize to be reported as bytes, kilobytes, or other? Including an example of the expected/desired output will greater your chance of getting a suitable solution/answer.

    – RobC
    Mar 28 at 11:10











  • hello benlat, you say "I would like the final CSV file to simply be a list of the sorted paths.", what do you mean exactly? Do you want; 1) Each filepath in a new row, all contained to a single column. 2) Or, each filepath in a separate column with all filepaths contained to a single row? 3) Or something else? ... Also, "Filesize no longer included", does that mean; 4) You don't want the filesize to be printed in the .csv file, but you do want the filepaths to be sorted by size in ascending or descending order? Showing us an example of desired CSV formatting will help.

    – RobC
    Mar 28 at 16:45

















0















I'm attempting to use Bash to find all of the text files on my hard drive, sort them according to size, and export a CSV list of their paths.



This is similar to a few other threads on SO. Probably most closely to this: How sort find result by file sizes



But there are a few variations on the previously suggested code that I don't quite understand.



This line allows me to search by file type and export the results as path names, but I am unclear about how to combine this with the other necessary functions (namely, sorting path names by size ).



find / -type f -name '*.txt' > ~/Desktop/sorted.csv


I am doing this on MacOS and I am new to Bash, so the solution so far has been difficult to ascertain.



edit:
Using bits of other code, I was able to piece this together. From what I understand, the "find" command finds all files with a txt extension and prints a full list of the file information, with path. "sort" picks the 5th "field", which is (always?) the file size, and sorts the information accordingly. "awk" is then used to print fields 9 through 13...which is a problem. this is printing bits and pieces of the path, potentially because each bit of the path occupies its own field at this point.



find / -type f -name '*.txt' -exec ls -al ;|sort -k 5 -n| awk ' print $9, $10, $11, $12, $13 ' > ~/Desktop/sorts/sorted.txt


Just to add one last addition, thanks to RobC's comments:
I would like the final CSV file to simply be a list of the sorted paths. Filesize no longer included. Ascending/Descending is not important.










share|improve this question


























  • benlat, welcome to SO. Can edit your question to show the community an example of how you want your resultant csv file to be formatted. Do you want filepaths be sorted in ascending or descending order by file size? Do you want the resultant .csv file to include both the filepath and its corresponding filesize, or just sorted filepaths only. If you do want filesize reported in the .csv file too, how do you want the filesize to be reported as bytes, kilobytes, or other? Including an example of the expected/desired output will greater your chance of getting a suitable solution/answer.

    – RobC
    Mar 28 at 11:10











  • hello benlat, you say "I would like the final CSV file to simply be a list of the sorted paths.", what do you mean exactly? Do you want; 1) Each filepath in a new row, all contained to a single column. 2) Or, each filepath in a separate column with all filepaths contained to a single row? 3) Or something else? ... Also, "Filesize no longer included", does that mean; 4) You don't want the filesize to be printed in the .csv file, but you do want the filepaths to be sorted by size in ascending or descending order? Showing us an example of desired CSV formatting will help.

    – RobC
    Mar 28 at 16:45













0












0








0


0






I'm attempting to use Bash to find all of the text files on my hard drive, sort them according to size, and export a CSV list of their paths.



This is similar to a few other threads on SO. Probably most closely to this: How sort find result by file sizes



But there are a few variations on the previously suggested code that I don't quite understand.



This line allows me to search by file type and export the results as path names, but I am unclear about how to combine this with the other necessary functions (namely, sorting path names by size ).



find / -type f -name '*.txt' > ~/Desktop/sorted.csv


I am doing this on MacOS and I am new to Bash, so the solution so far has been difficult to ascertain.



edit:
Using bits of other code, I was able to piece this together. From what I understand, the "find" command finds all files with a txt extension and prints a full list of the file information, with path. "sort" picks the 5th "field", which is (always?) the file size, and sorts the information accordingly. "awk" is then used to print fields 9 through 13...which is a problem. this is printing bits and pieces of the path, potentially because each bit of the path occupies its own field at this point.



find / -type f -name '*.txt' -exec ls -al ;|sort -k 5 -n| awk ' print $9, $10, $11, $12, $13 ' > ~/Desktop/sorts/sorted.txt


Just to add one last addition, thanks to RobC's comments:
I would like the final CSV file to simply be a list of the sorted paths. Filesize no longer included. Ascending/Descending is not important.










share|improve this question
















I'm attempting to use Bash to find all of the text files on my hard drive, sort them according to size, and export a CSV list of their paths.



This is similar to a few other threads on SO. Probably most closely to this: How sort find result by file sizes



But there are a few variations on the previously suggested code that I don't quite understand.



This line allows me to search by file type and export the results as path names, but I am unclear about how to combine this with the other necessary functions (namely, sorting path names by size ).



find / -type f -name '*.txt' > ~/Desktop/sorted.csv


I am doing this on MacOS and I am new to Bash, so the solution so far has been difficult to ascertain.



edit:
Using bits of other code, I was able to piece this together. From what I understand, the "find" command finds all files with a txt extension and prints a full list of the file information, with path. "sort" picks the 5th "field", which is (always?) the file size, and sorts the information accordingly. "awk" is then used to print fields 9 through 13...which is a problem. this is printing bits and pieces of the path, potentially because each bit of the path occupies its own field at this point.



find / -type f -name '*.txt' -exec ls -al ;|sort -k 5 -n| awk ' print $9, $10, $11, $12, $13 ' > ~/Desktop/sorts/sorted.txt


Just to add one last addition, thanks to RobC's comments:
I would like the final CSV file to simply be a list of the sorted paths. Filesize no longer included. Ascending/Descending is not important.







bash macos sorting






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 12:52







benlat

















asked Mar 27 at 5:14









benlatbenlat

11 bronze badge




11 bronze badge















  • benlat, welcome to SO. Can edit your question to show the community an example of how you want your resultant csv file to be formatted. Do you want filepaths be sorted in ascending or descending order by file size? Do you want the resultant .csv file to include both the filepath and its corresponding filesize, or just sorted filepaths only. If you do want filesize reported in the .csv file too, how do you want the filesize to be reported as bytes, kilobytes, or other? Including an example of the expected/desired output will greater your chance of getting a suitable solution/answer.

    – RobC
    Mar 28 at 11:10











  • hello benlat, you say "I would like the final CSV file to simply be a list of the sorted paths.", what do you mean exactly? Do you want; 1) Each filepath in a new row, all contained to a single column. 2) Or, each filepath in a separate column with all filepaths contained to a single row? 3) Or something else? ... Also, "Filesize no longer included", does that mean; 4) You don't want the filesize to be printed in the .csv file, but you do want the filepaths to be sorted by size in ascending or descending order? Showing us an example of desired CSV formatting will help.

    – RobC
    Mar 28 at 16:45

















  • benlat, welcome to SO. Can edit your question to show the community an example of how you want your resultant csv file to be formatted. Do you want filepaths be sorted in ascending or descending order by file size? Do you want the resultant .csv file to include both the filepath and its corresponding filesize, or just sorted filepaths only. If you do want filesize reported in the .csv file too, how do you want the filesize to be reported as bytes, kilobytes, or other? Including an example of the expected/desired output will greater your chance of getting a suitable solution/answer.

    – RobC
    Mar 28 at 11:10











  • hello benlat, you say "I would like the final CSV file to simply be a list of the sorted paths.", what do you mean exactly? Do you want; 1) Each filepath in a new row, all contained to a single column. 2) Or, each filepath in a separate column with all filepaths contained to a single row? 3) Or something else? ... Also, "Filesize no longer included", does that mean; 4) You don't want the filesize to be printed in the .csv file, but you do want the filepaths to be sorted by size in ascending or descending order? Showing us an example of desired CSV formatting will help.

    – RobC
    Mar 28 at 16:45
















benlat, welcome to SO. Can edit your question to show the community an example of how you want your resultant csv file to be formatted. Do you want filepaths be sorted in ascending or descending order by file size? Do you want the resultant .csv file to include both the filepath and its corresponding filesize, or just sorted filepaths only. If you do want filesize reported in the .csv file too, how do you want the filesize to be reported as bytes, kilobytes, or other? Including an example of the expected/desired output will greater your chance of getting a suitable solution/answer.

– RobC
Mar 28 at 11:10





benlat, welcome to SO. Can edit your question to show the community an example of how you want your resultant csv file to be formatted. Do you want filepaths be sorted in ascending or descending order by file size? Do you want the resultant .csv file to include both the filepath and its corresponding filesize, or just sorted filepaths only. If you do want filesize reported in the .csv file too, how do you want the filesize to be reported as bytes, kilobytes, or other? Including an example of the expected/desired output will greater your chance of getting a suitable solution/answer.

– RobC
Mar 28 at 11:10













hello benlat, you say "I would like the final CSV file to simply be a list of the sorted paths.", what do you mean exactly? Do you want; 1) Each filepath in a new row, all contained to a single column. 2) Or, each filepath in a separate column with all filepaths contained to a single row? 3) Or something else? ... Also, "Filesize no longer included", does that mean; 4) You don't want the filesize to be printed in the .csv file, but you do want the filepaths to be sorted by size in ascending or descending order? Showing us an example of desired CSV formatting will help.

– RobC
Mar 28 at 16:45





hello benlat, you say "I would like the final CSV file to simply be a list of the sorted paths.", what do you mean exactly? Do you want; 1) Each filepath in a new row, all contained to a single column. 2) Or, each filepath in a separate column with all filepaths contained to a single row? 3) Or something else? ... Also, "Filesize no longer included", does that mean; 4) You don't want the filesize to be printed in the .csv file, but you do want the filepaths to be sorted by size in ascending or descending order? Showing us an example of desired CSV formatting will help.

– RobC
Mar 28 at 16:45












1 Answer
1






active

oldest

votes


















0














Does this work:



find / -type f -name '*.txt' -exec du -k + | sort -rn > ~/Desktop/sorted.csv





share|improve this answer

























  • This would be a decent solution, although it's pointless to create a .csv with one column; I would do find / -type f -name '*.txt' -exec du -k + | sort -rn | tr 't' ',' > file.

    – l'L'l
    Mar 27 at 6:27












  • Only partially. It seems to print the size information first, then the path (I am just looking for the path). It also seems oddly specific to txt extension.. replacing .txt with .doc, it produces a blank file, making me think there is another problem somewhere...

    – benlat
    Mar 27 at 6:40











  • @benlat If you are looking for path then you could use awk after that like find / -type f -name '*.txt' -exec du -k + | sort -rn | awk 'print $2'

    – Sonny
    Mar 27 at 8:14











  • @Sonny - thanks for the ideas, but now this seems to produce incomplete paths (sometimes just printing the root folder and no other information) - and it still doesn't seem to handle other types of extension besides txt. I'm new to bash, so I'm a little uncertain about what is going on..

    – benlat
    Mar 27 at 15:20











  • Still at a complete loss here. Can anyone help?

    – benlat
    Mar 28 at 1:25










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55370214%2fhow-to-find-sort-by-size-and-export-with-bash%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Does this work:



find / -type f -name '*.txt' -exec du -k + | sort -rn > ~/Desktop/sorted.csv





share|improve this answer

























  • This would be a decent solution, although it's pointless to create a .csv with one column; I would do find / -type f -name '*.txt' -exec du -k + | sort -rn | tr 't' ',' > file.

    – l'L'l
    Mar 27 at 6:27












  • Only partially. It seems to print the size information first, then the path (I am just looking for the path). It also seems oddly specific to txt extension.. replacing .txt with .doc, it produces a blank file, making me think there is another problem somewhere...

    – benlat
    Mar 27 at 6:40











  • @benlat If you are looking for path then you could use awk after that like find / -type f -name '*.txt' -exec du -k + | sort -rn | awk 'print $2'

    – Sonny
    Mar 27 at 8:14











  • @Sonny - thanks for the ideas, but now this seems to produce incomplete paths (sometimes just printing the root folder and no other information) - and it still doesn't seem to handle other types of extension besides txt. I'm new to bash, so I'm a little uncertain about what is going on..

    – benlat
    Mar 27 at 15:20











  • Still at a complete loss here. Can anyone help?

    – benlat
    Mar 28 at 1:25















0














Does this work:



find / -type f -name '*.txt' -exec du -k + | sort -rn > ~/Desktop/sorted.csv





share|improve this answer

























  • This would be a decent solution, although it's pointless to create a .csv with one column; I would do find / -type f -name '*.txt' -exec du -k + | sort -rn | tr 't' ',' > file.

    – l'L'l
    Mar 27 at 6:27












  • Only partially. It seems to print the size information first, then the path (I am just looking for the path). It also seems oddly specific to txt extension.. replacing .txt with .doc, it produces a blank file, making me think there is another problem somewhere...

    – benlat
    Mar 27 at 6:40











  • @benlat If you are looking for path then you could use awk after that like find / -type f -name '*.txt' -exec du -k + | sort -rn | awk 'print $2'

    – Sonny
    Mar 27 at 8:14











  • @Sonny - thanks for the ideas, but now this seems to produce incomplete paths (sometimes just printing the root folder and no other information) - and it still doesn't seem to handle other types of extension besides txt. I'm new to bash, so I'm a little uncertain about what is going on..

    – benlat
    Mar 27 at 15:20











  • Still at a complete loss here. Can anyone help?

    – benlat
    Mar 28 at 1:25













0












0








0







Does this work:



find / -type f -name '*.txt' -exec du -k + | sort -rn > ~/Desktop/sorted.csv





share|improve this answer













Does this work:



find / -type f -name '*.txt' -exec du -k + | sort -rn > ~/Desktop/sorted.csv






share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 27 at 5:47









SonnySonny

2,7051 gold badge6 silver badges17 bronze badges




2,7051 gold badge6 silver badges17 bronze badges















  • This would be a decent solution, although it's pointless to create a .csv with one column; I would do find / -type f -name '*.txt' -exec du -k + | sort -rn | tr 't' ',' > file.

    – l'L'l
    Mar 27 at 6:27












  • Only partially. It seems to print the size information first, then the path (I am just looking for the path). It also seems oddly specific to txt extension.. replacing .txt with .doc, it produces a blank file, making me think there is another problem somewhere...

    – benlat
    Mar 27 at 6:40











  • @benlat If you are looking for path then you could use awk after that like find / -type f -name '*.txt' -exec du -k + | sort -rn | awk 'print $2'

    – Sonny
    Mar 27 at 8:14











  • @Sonny - thanks for the ideas, but now this seems to produce incomplete paths (sometimes just printing the root folder and no other information) - and it still doesn't seem to handle other types of extension besides txt. I'm new to bash, so I'm a little uncertain about what is going on..

    – benlat
    Mar 27 at 15:20











  • Still at a complete loss here. Can anyone help?

    – benlat
    Mar 28 at 1:25

















  • This would be a decent solution, although it's pointless to create a .csv with one column; I would do find / -type f -name '*.txt' -exec du -k + | sort -rn | tr 't' ',' > file.

    – l'L'l
    Mar 27 at 6:27












  • Only partially. It seems to print the size information first, then the path (I am just looking for the path). It also seems oddly specific to txt extension.. replacing .txt with .doc, it produces a blank file, making me think there is another problem somewhere...

    – benlat
    Mar 27 at 6:40











  • @benlat If you are looking for path then you could use awk after that like find / -type f -name '*.txt' -exec du -k + | sort -rn | awk 'print $2'

    – Sonny
    Mar 27 at 8:14











  • @Sonny - thanks for the ideas, but now this seems to produce incomplete paths (sometimes just printing the root folder and no other information) - and it still doesn't seem to handle other types of extension besides txt. I'm new to bash, so I'm a little uncertain about what is going on..

    – benlat
    Mar 27 at 15:20











  • Still at a complete loss here. Can anyone help?

    – benlat
    Mar 28 at 1:25
















This would be a decent solution, although it's pointless to create a .csv with one column; I would do find / -type f -name '*.txt' -exec du -k + | sort -rn | tr 't' ',' > file.

– l'L'l
Mar 27 at 6:27






This would be a decent solution, although it's pointless to create a .csv with one column; I would do find / -type f -name '*.txt' -exec du -k + | sort -rn | tr 't' ',' > file.

– l'L'l
Mar 27 at 6:27














Only partially. It seems to print the size information first, then the path (I am just looking for the path). It also seems oddly specific to txt extension.. replacing .txt with .doc, it produces a blank file, making me think there is another problem somewhere...

– benlat
Mar 27 at 6:40





Only partially. It seems to print the size information first, then the path (I am just looking for the path). It also seems oddly specific to txt extension.. replacing .txt with .doc, it produces a blank file, making me think there is another problem somewhere...

– benlat
Mar 27 at 6:40













@benlat If you are looking for path then you could use awk after that like find / -type f -name '*.txt' -exec du -k + | sort -rn | awk 'print $2'

– Sonny
Mar 27 at 8:14





@benlat If you are looking for path then you could use awk after that like find / -type f -name '*.txt' -exec du -k + | sort -rn | awk 'print $2'

– Sonny
Mar 27 at 8:14













@Sonny - thanks for the ideas, but now this seems to produce incomplete paths (sometimes just printing the root folder and no other information) - and it still doesn't seem to handle other types of extension besides txt. I'm new to bash, so I'm a little uncertain about what is going on..

– benlat
Mar 27 at 15:20





@Sonny - thanks for the ideas, but now this seems to produce incomplete paths (sometimes just printing the root folder and no other information) - and it still doesn't seem to handle other types of extension besides txt. I'm new to bash, so I'm a little uncertain about what is going on..

– benlat
Mar 27 at 15:20













Still at a complete loss here. Can anyone help?

– benlat
Mar 28 at 1:25





Still at a complete loss here. Can anyone help?

– benlat
Mar 28 at 1:25








Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55370214%2fhow-to-find-sort-by-size-and-export-with-bash%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript