Code:
#!/bin/bash
# Extract all the zip files
for i in *.zip
do unzip "$i"
done
# Create an empty file called main.cvs
touch main.cvs
# Print the first line ONLY of file1.cvs to main.cvs
sed -n '1p' file1.cvs > main.cvs
# Append all cvs files minus the first line to main.cvs
for i in file*.cvs
do
sed -n '2,$p' "$i" >> main.cvs
done
To customize the script for your situation, replace the red with your actual file names.
- Cheers