The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Meaning of this line in script radiatejava Shell Programming and Scripting 3 01-22-2009 07:06 AM
Use and meaning of $* sinpeak UNIX for Dummies Questions & Answers 2 01-09-2009 02:49 AM
if [ ! -r ${1} ] meaning in ksh naveeng.81 Shell Programming and Scripting 1 04-09-2008 02:47 PM
What is the meaning of "tab" in script ? so_friendly Shell Programming and Scripting 3 07-10-2006 02:34 AM
what is the meaning here? forevercalz Shell Programming and Scripting 2 09-29-2005 01:46 PM

Reply
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
  #1 (permalink)  
Old 10-27-2009
kaydream kaydream is offline
Registered User
  
 

Join Date: Jul 2009
Posts: 10
meaning of script

hello every one i want to know meaning of following line
Code:
INST_PARA=$HOME/install/Install.Para
SAVEMEDIUM=`awk '$2=="ArchiveSave"{print$4}' $INST_PARA`


Last edited by pludi; 10-27-2009 at 06:35 AM.. Reason: code tags, please...
  #2 (permalink)  
Old 10-27-2009
mglenney mglenney is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 85
The first line assigns the path and name of a file to the variable INST_PARA. On the next line, awk is being used to look through each line of that file. If the 2nd ($2) item on the line is "ArchiveSave", print out the 4th ($4) item on that line. If you want to include a portion of the file $HOME/install/Install.Para I can show you what the output would be.

BTW, I believe there needs to be a space between 'print' and '$4'
  #3 (permalink)  
Old 10-28-2009
kaydream kaydream is offline
Registered User
  
 

Join Date: Jul 2009
Posts: 10
file install.para

thank you for replying the below line is install.para and plus if i want the output be "DVD" what i must add to this file

% Component % COM %
% Device % /dev/rStp0 %
% Host % local %
% Language % engl %
% Font % 1 %
% Screen % X11 %
% TouchScr % false %
% TimeServer % false %
% TimeClient % true %
% TextServer % -local %
% Variant % VFF %
% Verbose % true %
% Trace % false %
% ArchiveBlocks % 1900 %

Last edited by kaydream; 10-28-2009 at 03:16 AM..
  #4 (permalink)  
Old 10-28-2009
mglenney mglenney is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 85
The script lines you posted will set the variable SAVEMEDIUM to the value of ArchiveSave. So to have it set to DVD add the following line to Install.Para:


Code:
% ArchiveSave % DVD %

  #5 (permalink)  
Old 10-31-2009
kaydream kaydream is offline
Registered User
  
 

Join Date: Jul 2009
Posts: 10
thank you very much

Last edited by kaydream; 10-31-2009 at 02:56 AM..
Reply

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 12:15 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