I have this script:
#!/bin/sh
echo "Start: " $(date +%s)
(time hive --hiveconf mapreduce.job.reduce.slowstart.completedmaps=0.5 --hiveconf mapred.reduce.tasks=10 --hiveconf mapreduce.reduce.shuffle.parallelcopies=15 --hiveconf hive.execution.engine=mr -f sample-queries-tpcds/query50.sql --database tpcds_text_db_1_10) 2> output/tpcds_query_2c_50_mr.out
echo "End: " $(date +%s)
How can I add some code inside it so that it will kill itself say after 5 seconds of execution? (like after 5 seconds of ./script.sh )?