I want to define a new ls
command to do something like this
The first when i use ordinary ls
command:
$ls
undergrade.AI undergrade.KDD
undergrade.AI2 undergrade.micro
undergrade.ANN undergrade.OOT
undergrade.autoMata undergrade.OS
undergrade.bulletin undergrade.parallelAndDistributedProgramming
undergrade.CG undergrade.pop
undergrade.CLP undergrade.PPL
undergrade.comNet undergrade.researchingMethod
undergrade.comOr undergrade.SA
undergrade.comSec undergrade.SE
undergrade.DBMS undergrade.softwareTesting
undergrade.discrete undergrade.webApps
code.ajax code.cc code.erl code.html code.js code.pl code.py
code.sage code.x3d code.c code.cl code.go code.jquery code.lisp
code.pro code.roo code.sh code.xml
And for a new ls that i want:
$ls_new
undergrade code
I want it to show only the first word when i type ls_new
.
Why do i want this command?
Because i named my folders in pattern of category.subj
that so too much output when i use ordinary ls
. then i need some command that can filter, group and show them but only the category
name.
undergrade
andcode
directories with subdirectories calledAI
,ajax
, etc... Directories nest for a reason!tree
outputs ;)