Sponsored Content
Top Forums Shell Programming and Scripting Cutting specific lines from a file Post 73492 by pathanjalireddy on Thursday 2nd of June 2005 03:58:58 AM
Old 06-02-2005
Hi,

Thanx. What should I do if want the first and last line of Mani.txt
I have a file called Log.txt. The contents of the file are
--------------------------------------------------------------------------

Creating Control File for sqlloader
Control file (data.ctl) Created for sqlloader
The execution of tool has started at Tue, May 31, 2005 03:45:37 AM
The User running the tool is DACSCAN
The present working directory is /usr/dacscan/toolbin
Temporary Table Created for Updating the Original Table
Temp Table have been created for storing the updated Records
Updation Successfully Completed on the Original Table
SQL> select * from spr1;

DOMAIN_NAME CKT COLOR SYS_UPDATE
-------------------- ------------------------------ ----- ----------
AREA_hickory 76L/37_690021/7JK1-711020/7JK1 R Y
AREA_hickory 76L/37_690021/7JK1-711020/7JK2 G N
AREA_aspen 76L/37_690021/7JK1-711020/7JK1 R Y

SQL> spool off;
Temp Table for storing updated records have been dropped
Temp Table created for updating the original Table is Dropped
All the Original Files have been moved to /dacscan/trace Folder
The execution of tool has finished execution at Tue, May 31, 2005 03:45:48 AM
The tools execution time is from Tue, May 31, 2005 03:45:37 AM to Tue, May 31, 2005 03:45:48 AM
------------------------------------------------------------------------

I want to remove the sentences SQL>select * from spr1 and
SQL> spool off;

What should I do

Thanx in advance
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Cutting n consecutive lines from a file...

Hi, I have this problem of separating 10 consecutive lines from a file, say starting from 21 to 30... I have used a filter like this.. head -n 30 myfile | tail -n 10 Is there a simpler way than this? (2 Replies)
Discussion started by: Vishnu
2 Replies

2. Shell Programming and Scripting

Cutting specific name from configuration file

Hi falks, I have the following configuration file structure: file1:N file2:Y file3:Y file4:N ...... I need to cut from the configuration file only the file with the sign "Y" in the end and copy it to some directory. What is the best way to do it? Thanks in advance, Nir (8 Replies)
Discussion started by: nir_s
8 Replies

3. UNIX for Dummies Questions & Answers

how to display specific lines of a specific file

are there any basic commands that can display lines 99 - 101 of the /etc/passwd file? I'm thinking use of head and tail, but I forget what numbers to use and where to put /etc/passwd in the command. (2 Replies)
Discussion started by: raidkridley
2 Replies

4. Shell Programming and Scripting

How to cut first line only from a text near a specific column without cutting a word

First I have to say thank you to this community and this forum. You helped me very much builing several useful scripts. Now, I can't get a solution the following problem, I'm stuck somehow. Maybe someone has an idea. In short, I dump a site via lynx and pipe the output in a file. I need to... (7 Replies)
Discussion started by: lowmaster
7 Replies

5. Shell Programming and Scripting

cutting lines

Dear All, Is there a way to cut the lines that have been "head" Here is what i m trying to do Please advice there is file name dummy.txt now i am trying to head this file 4 time by using a loop and every time this file is head with different values e.g in first instance it will... (7 Replies)
Discussion started by: jojo123
7 Replies

6. Shell Programming and Scripting

Cutting specific line of a file by checking condition

testfile.csv 0","1125209",,"689202CBx18888",,"49",,,"NONMC",,,,,"01112010",,,,,,,"MTM- "1","",,"689202ABx19005",,"49",,,"NONMC",,,,,"01072010",,,,,,,"MTM- testfile.csv looks like above format if the second column is null then get 23rd column and store in a different varible .. add all the... (1 Reply)
Discussion started by: mgant
1 Replies

7. Shell Programming and Scripting

Cutting out text from specific portion on filename

Hi, how do I go about cutting out the first numeric characters after the word "access"? access1005101228.merged-00.15.17.86.d8.b8.log.gz (16 Replies)
Discussion started by: GermanJulian
16 Replies

8. Shell Programming and Scripting

Cutting rows at specific length

Hi, i have a file containing nrows and 3cols. i want to cut it in specific length and save output to individual files. 1 2 3 4 5 6 5 8 9 10 11 12 13 14 15 16 17 18 i need to cut the file say every 2 rows and save it in individual file. 01.dat contains 1 2 3 4 5 6 02.dat 7 8 9... (10 Replies)
Discussion started by: ida1215
10 Replies

9. UNIX for Dummies Questions & Answers

Quick UNIX command to display specific lines in the middle of a file from/to specific word

This could be a really dummy question. I have a log text file. What unix command to extract line from specific string to another specific string. Is it something similar to?: more +/"string" file_name Thanks (4 Replies)
Discussion started by: aku
4 Replies

10. UNIX for Dummies Questions & Answers

Cutting specific columns from lines

I am trying to remove columns 81-97 from a line that can be as long as 114 characters. Because a number of lines might not have under 80 characters, using the cut command following by paste could be a problem. While sed might work, is there some other utility that could do this more easily? ... (9 Replies)
Discussion started by: wbport
9 Replies
cd_ptrec(3)						     Library Functions Manual						       cd_ptrec(3)

NAME
cd_ptrec, cd_cptrec - Reads the Path Table Record from the CD-ROM Path Table LIBRARY
Rock Ridge and X/Open Extensions to the CDFS library (libcdrom.so, libcdrom.a) SYNOPSIS
#include <sys/cdrom.h> int cd_ptrec ( char *path, struct iso9660_ptrec *ptrec ); int cd_cptrec ( char *path, char *addr ); PARAMETERS
Points to a file or directory within the CD-ROM File System hierarchy. Points to the iso9660_ptrec structure that holds the contents of the Path Table Record associated with the file or directory pointed to by *path. The iso9660_ptrec structure is defined in cdfs/xcdr.h, an include file that is called into sys/cdrom.h Specifies the address to which the function cd_cptrec copies the complete Path Table Record that is recorded on the CD-ROM. DESCRIPTION
The cd_ptrec routine fills the *ptrec structure with the contents of the Path Table Record associated with the directory that is pointed to by *path. The cd_cptrec function copies the complete Path Table Record that is recorded on the CD-ROM to the address pointed to by *addr. The user must allocate {CD_MAXPTRECL} bytes for the Path Table Record. The variable {CD_MAXPTRECL} is defined in cdfs/xcdr.h, an include file that is called into sys/cdrom.h. RETURN VALUES
If successful, the value zero is returned. If unsuccessful, the integer -1 is returned and errno is set to indicate the error. ERRORS
The function will fail if: Search permission is denied for a directory in *path or read permission is denied for the named directory. The address of *path or *addr is invalid. A signal was caught during execution of the function. The argument *path points to a file or direc- tory that is not within the CD-ROM file hierarchy. {OPEN_MAX} file descriptors are currently open in the calling process. [Tru64 UNIX] Either the OPEN_MAX value or the per-process soft descriptor limit is checked. The length of the *path string exceeds {PATH_MAX}, or a pathname component is longer than {NAME_MAX} while {_POSIX_NO_TRUNC} is in effect. The system file table is full. A component of *path does not exist, or the *path argument points to an empty string. A component of the *path prefix is not a directory. The CD-ROM is not in the drive, or a read error occurred. RELATED INFORMATION
Files: cdfs/xcdr.h, sys/cdrom.h. delim off cd_ptrec(3)
All times are GMT -4. The time now is 06:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy