The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Create individual tgz files from a set of files amitg UNIX for Dummies Questions & Answers 4 04-29-2008 10:13 AM
Inserting variables from 2 files to create 1 file rochitsharma UNIX for Advanced & Expert Users 1 03-17-2008 10:33 AM
Create files with one command jess_t03 Shell Programming and Scripting 6 10-09-2007 03:30 PM
on how to create files fiol73 UNIX for Dummies Questions & Answers 2 12-19-2006 07:41 AM
Create and pw protect .tar files clovell UNIX for Dummies Questions & Answers 5 06-22-2005 11:24 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 11-02-2004
jordimirobruix jordimirobruix is offline
Registered User
  
 

Join Date: Nov 2004
Posts: 3
Question Trying to create files from a file

Hello to everyone,
I am new to UNIX and I am having a problem. I have a file full of information, and need to create diferent files. I have to split the file whenever I find a sentence in the original one. This sentence is always the same (JOB ^....). As you can see I need to read a file, and whenever I find a sentence create a new file, ending whenever I find that sentence again. I have read about sed and awk, but don't know how to use it, or if it is the best option. I need to split the file because the next step in the process is not capable of doing it.
An example of the original file would be:
Job^1
a
b
c
Job^2
d
e
f

And need to end with a two files. The first file:
Job^1
a
b
c
A second file:
Job^2
d
e
f

Any help anyone could give me would be very appreciated.
Thanks a lot.
Jordi

Last edited by jordimirobruix; 11-02-2004 at 08:34 AM..
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:28 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0