CLAWRIM Wiki

Computing Lab for Advanced Water Resources Informatics and Modeling

User Tools

Site Tools


shell_scripting

This is an old revision of the document!


Shell scripting

  1. Create C:\opt\bin
  2. Copy busybox.exe to C:\opt\bin
  3. Start busybox.exe
C:\opt\bin\busybox.exe sh -l

Merging CSV files in the current directory

first=1
for i in *.csv; do
  if [ "$i" = "merged.csv" ]; then
    continue
  fi
  if [ $first -eq 1 ]; then
    cat "$i"
    first=0
  else
    tail -n +2 "$i"
  fi
done > merged.csv
shell_scripting.1695336071.txt.gz · Last modified: 2023-09-21 04:41 pm by hcho

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki