Spark : how to run spark file from spark shell February 22, 2023 by Tarik In command line, you can use spark-shell -i file.scala to run code which is written in file.scala