for x in {a..z}
do
echo "$x"
mkdir -p path2/${x}
mv path1/${x}*.ext path2/${x}
done
More Related Contents:
- How do I iterate over a range of numbers defined by variables in Bash?
- Looping over pairs of values in bash [duplicate]
- How to loop over files in directory and change path and add suffix to filename
- How to perform a for loop on each character in a string in Bash?
- How to skip the for loop when there are no matching files?
- How can I escape white space in a bash loop list?
- Emulating a do-while loop in Bash
- How do you run a command eg chmod, for each line of a file?
- Is there a better way to run a command N times in bash?
- How to parallelize for-loop in bash limiting number of processes
- How to loop through dates using Bash?
- How do I write a ‘for’ loop in Bash?
- Looping through all files in a directory [duplicate]
- How to add leading zeros for for-loop in shell? [duplicate]
- Using a variable in brace expansion range fed to a for loop
- Bash scripting, multiple conditions in while loop
- Syntax for a single-line while loop in Bash
- Loop over tuples in bash?
- How to iterate over list which contains whitespaces in bash
- Retry a Bash command with timeout
- Reading lines in a file and avoiding lines with # with Bash
- redirect COPY of stdout to log file from within bash script itself
- Shell: How to call one shell script from another shell script?
- Process all arguments except the first one (in a bash script)
- How to represent multiple conditions in a shell if statement?
- Generating permutations using bash
- How to properly handle a gzipped page when using curl?
- Percent sign % not working in crontab
- Running shell command that has nested quotes via ssh
- Run a shell script and immediately background it, however keep the ability to inspect its output