LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-02-2018, 07:51 AM   #1
DoME69
Member
 
Registered: Jan 2008
Posts: 172

Rep: Reputation: 16
Question Need help pull out section from file (Prefered TCL)


Hi,

Need help by pull out section from file.

FILE:
Quote:
.
.
.
.
bla bla bla

*********
report
bla bla bla
****************
Warning:

start: popo
details_ccc
end: kuku
mish
mash
mush
kuku
finish


start: popo1
details_bbb
end: kuku1
mish1
mash1
mush1
kuku1
finish

start: popo2
details_aaa
end: kuku2
mish2
mash2
mush2
kuku2
finish

I want to write command line/script (prefered tcl) to pull out section information as below (start & finish word wrap the information section I want to find)
command line should search in the line of end: *

> command kuku1

Quote:
start: popo1
details
end: kuku1
mish1
mash1
mush1
kuku1
finish

Last edited by DoME69; 04-02-2018 at 07:53 AM.
 
Old 04-02-2018, 08:08 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 20,270

Rep: Reputation: 4902Reputation: 4902Reputation: 4902Reputation: 4902Reputation: 4902Reputation: 4902Reputation: 4902Reputation: 4902Reputation: 4902Reputation: 4902Reputation: 4902
Quote:
Originally Posted by DoME69 View Post
Hi,
Need help by pull out section from file.

I want to write command line/script (prefered tcl) to pull out section information as below (start & finish word wrap the information section I want to find)
command line should search in the line of end: *
Ok...since we know what you want, can you show us what YOU have done/tried/written to do it?? Read the "Question Guidelines" link in my posting signature. We are happy to help you, but we WILL NOT write your scripts for you. You have been here ten years now, which is certainly long enough to know this. You've been asking for TCL and other scripts for years now:
https://www.linuxquestions.org/quest...at-tcl-914649/
https://www.linuxquestions.org/quest...th-tcl-914104/
https://www.linuxquestions.org/quest...um-num-912297/

Since you've got years of experience with doing scripting at this point, it should be easy for you to show us your efforts.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Pull sections of text from a file and create a new file? soupmagnet Linux - Newbie 3 12-27-2012 04:46 PM
prefered filesystem for linux file server? tomViolet Linux - Server 3 10-29-2010 04:58 PM
How to pull sequential lines from a file? WingnutOne Linux - Newbie 11 09-07-2007 10:37 AM
Prefered file format for attachments, etc. leupi Linux - General 3 05-11-2005 05:05 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration