You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Louis Maddox edited this page Jan 8, 2018
·
2 revisions
you can use python -c as a short version of awk, e.g. to parse the output of ls -lt for the last column (but it's better to just use it as a throwaway scripting method rather than using awk)
handy one liner to copy over directories [e.g. month directories at the start of the year], the below line copied february-december month subfolders initialised for a 'chemistry' category directory:
dirlist=$(python -c 'import os; dirl=os.listdir("../chem"); dirl.sort(); [print(x) for x in dirl[1:]]')forlin$dirlist;do mkdir "$l";done