Skip to main content

Accessing a field in csh [Resolved]

This piece of code:

foreach mod ("`lsmod`")
   echo $mod
end

outputs each line of lsmod. How can I access the first field, i.e. Module, from each line?

Is there any IDE forcsh or extension for vs code where I can debug csh code?


Question Credit: Emon Haque
Question Reference
Asked July 13, 2019
Tags: csh
Posted Under: Unix Linux
12 views
1 Answers

foreach mod ("`lsmod`")
   set ml = ($mod)
   echo "$ml[1]"
end

credit: mosvy
Answered July 13, 2019
Your Answer
D:\Adnan\Candoerz\CandoProject\vQA