---
title: "linux 读取最后1行"
author: "foolraty"
date: "2011-10-13T13:30:29Z"
tags: []
slug: "linux-1"
draft: false
lastmod: "2011-10-13T13:30:29Z"
id: 1194434
url: "https://foolraty.iteye.com/blog/1194434"
---

#read the last 2 line of file
#new=`tail -n 2 /data/bakper30minExp.log`
#echo $abc
#read the last 2 line of file
#success=`tail -n 2 /data/bakper30minExpSuccess.log`
#echo $test
#if ;then
#        echo "Exp success"
#       sqlplus mnshbak/mnshbak@orcl @/u/dropPer30min.sql
#       imp mnshbak/mnshbak@orcl file=/data/bakper30min.dat fromuser=mnsh touser=mnshbak log=/data/bakper30minImp.log
#       cp /data/bakper30min.dat /data/bakper30minSuccess.dat
#else
#       echo "Exp fail"
#fi