LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 10-03-2010, 10:20 PM   #1
comvat25
LQ Newbie
 
Registered: Oct 2010
Posts: 2

Rep: Reputation: 0
Project due in AM, and i'm still having difficulties :(


Hey all, this site has been EXTREMELY useful to me seeing i'm in this bash programming class for my grad studies, and it's all new to me..

I'm writing a script that edits a Maya ascii file. Inside the .MA(maya ascii file) there is a line defaultRenderGlobals. My script is supposed to find this line and according to what options they manipulate will update the lines below defaultRenderGlobals. I've got that working... but... the issue i'm having is that defaultRenderGlobals is only made when a the maya scene is made into a batch render. I want my script to manually add this defaultRenderGlobals line into the .ma file if its not there and add the certain lines below it. BUT, if defaultRenderGlobals is already there I want to just manipulate whats below it. Hope this makes sense? Quick help would be e-mazing!

In short: using sed or something equiv, I need to search for a string or pattern in a ascii file and if its found append a few lines to it, if its not found, add the main line with appended lines to it.

-steve
 
Old 10-03-2010, 11:06 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed in favour of the more sensibly placed duplicate.


http://www.linuxquestions.org/questi...attern-836004/
 
  


Closed Thread


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
Kernel Deleted due to Upgrade, Cannot Reinstall Kernel due to Dependency Issues Kenji Miyamoto Debian 2 02-17-2007 10:44 AM
Project Due Tommorow, Partner Stiffed Me xxmustainexx Programming 6 10-19-2006 04:54 PM
Difficulties about my project idea kuldeep_kap Programming 9 09-27-2005 03:15 PM
Difficulties about my project idea kuldeep_kap Linux - General 1 09-24-2005 01:24 PM
Error USB-HUC on booting due in mdk10 due to mx700 Boudewijn Mandriva 4 10-09-2004 09:36 AM


All times are GMT -5. The time now is 06:06 AM.

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