Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

foreach bash

for n in $(cat lists.txt )
do
    echo "Working on $n file name now"
    # do something on $n below, say count line numbers
    # wc -l "$n"
done

#################

input="lists.txt"
 
## Let us read a file line-by-line using while loop ##
while IFS= read -r line
do
  printf 'Working on %s file...
' "$line"
done < "$input"
Comment

PREVIOUS NEXT
Code Example
Shell :: convert csv to json powershell 
Shell :: how to add user to group 
Shell :: git remove cached directory 
Shell :: pnpm auto-install-peers 
Shell :: install terminus in ubuntu 
Shell :: ip config ubuntu 
Shell :: check lines of code added removed by a specific user 
Shell :: update prisma latest version 
Shell :: how to install quick.db 
Shell :: bash command to open new terminal 
Shell :: ubuntu get process on port 
Shell :: vlc linux 
Shell :: vscode display all extensions 
Shell :: conda check cuda version 
Shell :: docker alpine create user and group 
Shell :: vim open shell in current directory 
Shell :: delete last commit from remote repo 
Shell :: ubuntu facial recognition login 
Shell :: create gitignore files windows 
Shell :: bash how to trim every nth line 
Shell :: headlessui npm 
Shell :: count occurrences of word in file linux ignoring case 
Shell :: npm clear cache 
Shell :: open xampp control panel from terminal ubuntu 20 
Shell :: install python3 and python pip in docker 
Shell :: how to install node js in ubuntu 
Shell :: graphql install 
Shell :: linux find text in files recursively -include 
Shell :: matlab on ubuntu 
Shell :: how to install anydesk on manjaro 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =