I'm trying to achieve the folowing:

```
  #!/bin/bash
  if [ -f file2 ]; then

  cat file2 > file1
  sed -i 's#some operation' file1
  cat file3 >> file1

  exit 0

  elif [ ! -f file2 ]; then

  cat file1 > file2
  sed -i 's#some operation' file1
  cat file3 >> file1

  exit 0

  else

  echo "something"
  exit 1

  fi

```

Any ideas how to do it simpler ?
Without using that much cat and files ?

Thanks !