list directory names feed to next command
need help for writing a script.
i have a bpm directory which has list of nodes. which are folder names.
i want to list these names, save somewhere or directly pass the names one by one to next command and get the command out save in some file.
i tried using ls, cut, grep etc....not successfully.
any body mastered with awk or sed kindly can help me.
e.g., Dir A
having B,C,D,E etc.
Get the B,C,D,E and pass to command one by one. n save the output to other file for further manipulations.