Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Move WordPress site from one hosting service to other. PHP/MYSQL/Wordpress
  • reset Sequence Oracle
  • Finding locked objects Oracle
  • Single character replacement in Unix Linux/Unix
  • eplan.sql Oracle
  • plan10g.sql Oracle
  • Find long Running Transaction Linux/Unix
  • Resolving RMAN Hung Jobs Oracle
  • tab.sql Oracle
  • USE_NL and INDEX hints example Oracle
  • Looping for remote servers and find its database from oratab file. Linux/Unix
  • SCRIPT TO LIST RECURSIVE DEPENDENCY BETWEEN OBJECTS UTLDTREE.sql Oracle
  • Find Command Linux/Unix
  • Rman Notes -1 Oracle
  • ENQ: KO – FAST OBJECT CHECKPOINT tips 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

  • For Search and replace unix command. Linux/Unix
  • Kernel Parameter setting explaination for Processes Parameter Linux/Unix
  • find checksum of a file. Linux/Unix
  • move_arch_files.ksh Linux/Unix
  • Find Command Linux/Unix
  • Search and Replace vi editor command. Linux/Unix

Leave a Reply Cancel reply

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

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • load SPM baseline from cursor cache05-Jun-2025
  • Drop all SPM baselines for SQL handle05-Jun-2025
  • Load SPM baseline from AWR05-Jun-2025
  • Drop specific SQL plan baseline – spm05-Jun-2025
  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Nice notes on wait events Oracle
  • Import and export statements Oracle
  • Guide to Linux System Command Mastery Linux/Unix
  • This is from Temi Oracle
  • Directory wise folder wise space usage Linux/Unix
  • My Test Case On 21-OCT-2005 Oracle
  • All About Trace Fils Oracle
  • Reading parameter file and printing Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme