Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Jai Shree Ram Oracle
  • longtx.sql with the flag whether session is blocking any DML locks or not. Oracle
  • In Addition to previous note, following grants needed on PERFSTAT user. Oracle
  • DBA_HIST_SQLSTAT contents Oracle
  • findinfo.sql (SQL for getting CPU and Active session info) Oracle
  • findx.sql /* Find Indexes on specified USER.TABLE_NAME */ Oracle
  • Good link for LIO in Oracle ( Logical IOs) Oracle
  • T-SQL Vs PL/SQL Syntax SQL Server
  • move_arch_files.ksh /* Good One */ Linux/Unix
  • scp with ssh2 Linux/Unix
  • Configure ssh authentications for RAC Oracle
  • Oracle Standby Database Library Index from Metalink Oracle
  • Sample WW22 listener.ora Oracle
  • USE_NL and INDEX hints example Oracle
  • sbind.sql Find Bind variable from sql_id sqlid Oracle

Deleting first line and lastline of a file using sed

Posted on 04-Feb-2010 By Admin No Comments on Deleting first line and lastline of a file using sed

Delete last line of a file.

===========================

sed ‘$d’ < input_file > output_file

Delete First line of a file.

============================

sed ‘1d’ input_file > output_file

Linux/Unix, shell

Post navigation

Previous Post: Pending Transaction Neighbors Script
Next Post: Distributed Transaction Troubleshooting.

Related Posts

  • process id based files and processes Linux/Unix
  • Some OS level threshold for performance. Linux/Unix
  • scripts to take listener.log backup Linux/Unix
  • For Search and replace unix command. Linux/Unix
  • Session_info.ksh Linux/Unix
  • Finding last recovered file on DR and remove all chanracters before any “/” Linux/Unix

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Django (0)
  • GIT (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (395)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (150)
  • SQL scripts (343)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • prepfiles.sh for step by step generating pending statistics files10-Mar-2026
  • tracksqltime.sql05-Mar-2026
  • Complete Git Tutorial for Beginners25-Dec-2025
  • Postgres DB user and OS user.25-Dec-2025
  • Trace a SQL session from another session using ORADEBUG30-Sep-2025
  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • find checksum of a file. Linux/Unix
  • tar and untar a dolder with all its subfolder. Linux/Unix
  • ORA-4031 issue and solution on 09-MAY-2008 Oracle
  • how to find OS block size Oracle
  • create a folder in multiple places Linux/Unix
  • Distributed Transaction Troubleshooting. Oracle
  • chk_space_SID.ksh Linux/Unix
  • cache buffer chain latch Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme