The UNIX and Linux Forums  

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
Read specific file from a zip archive without extracting sridharg Shell Programming and Scripting 4 12-02-2008 11:36 AM
Extracting specific text from a file rahulkav Shell Programming and Scripting 8 10-22-2008 11:34 AM
problems iterating in RUBY while extracting info from YAML, Pls help! wrapster High Level Programming 1 10-05-2008 03:38 PM
Is extracting specific files from a zip file possible? HLee1981 UNIX for Dummies Questions & Answers 1 10-15-2005 12:06 AM
Parsing file and extracting the useful data block arminder Shell Programming and Scripting 5 03-07-2005 09:37 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 01-22-2009
Rhije Rhije is offline
Registered User
  
 

Join Date: Dec 2008
Posts: 103
Parsing file, yaml file? Extracting specific sections

Here is a data file, which I believe is in YAML. I am trying to retrieve just the 'addon_domains" section, which doesnt seem to be as easy as I had originally thought. Any help on this would be greatly appreciated!! I have been trying to do this in awk and mostly bash scripting instead of perl or high level scripting language.

This is actually from /var/cpanel/userdata/username/main


Code:
---
addon_domains:
  somedomain.com: mysubdomain.primarydomain.com
  somedomain2.com: mysubdomain2.primarydomain.com
  somedomain3.com: mysubdomain3.primarydomain.com
cp_php_magic_include_path.conf: 0
main_domain: primarydomain.com
parked_domains: []

sub_domains:
  - mysubdomain.primarydomain.com
  - mysubdomain2.primarydomain.com
  - mysubdomain3.primarydomain.com

 

Bookmarks

Tags
awk, cpanel, linux, yaml

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 07:34 PM.


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