meaning of script


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers meaning of script
# 1  
Old 10-27-2009
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 07:35 AM.. Reason: code tags, please...
# 2  
Old 10-27-2009
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  
Old 10-28-2009
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 04:16 AM..
# 4  
Old 10-28-2009
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  
Old 10-31-2009
thank you very much

Last edited by kaydream; 10-31-2009 at 03:56 AM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Meaning of =~ in shell script

Please let me understand the meaning of following line in unix bash scripting .is =~ means not equal to or equal to . if ]; then echo -e "pmcmd startworkflow -sv ${INTSERV} -d ${INFA_DEFAULT_DOMAIN} -uv INFA_DEFAULT_DOMAIN_USER" \ "-pv INFA_DEFAULT_DOMAIN_PASSWORD -usdv... (2 Replies)
Discussion started by: harry00514
2 Replies

2. Shell Programming and Scripting

What is the meaning of ## in UNIX shell script?

Hi All, I am new to unix shell scripting and I was documenting one of the unix script and encountered below statements - for ii in `ls -1rt /oracle/admin/MARSCOPY/ext_files/fpm-ifpm/*.small.txt | tail -1 | awk '{print $1}'` do smallssim=${ii##/oracle/admin/MARSCOPY/ext_files/fpm-ifpm/}... (2 Replies)
Discussion started by: shuklajayb4
2 Replies

3. UNIX for Dummies Questions & Answers

UNIX Script - snipet meaning?

What would the below code snippet mean? my ($_configParam, $_paramValue) = split(/\s*=\s*/, $_, 2); $configParamHash{$_configParam} = $_paramValue; (2 Replies)
Discussion started by: MaKha
2 Replies

4. UNIX for Dummies Questions & Answers

Meaning of awk script

what does this mean? awk '!a||a>$1 {a=$1} END {for (i in a) print a,i}' file (6 Replies)
Discussion started by: osama ahmed
6 Replies

5. UNIX for Dummies Questions & Answers

Meaning of script with echo, -d, -f1, -f2

Hello Friends, I am a new learner of Unix & need to understand below script as start up, Can anyone explain the meaning of each line listed below. Thanks for your time. #!/usr/bin/ksh PARAMS=$1 #echo "parms passed is $PARAMS @" STATUS=`echo ${PARAMS} | cut -d: -f1` JOBNAME=`echo... (9 Replies)
Discussion started by: DK2014
9 Replies

6. Shell Programming and Scripting

Whats the meaning of set -e inside the script

Hi, I would like to ask about the meaning or purpose of set -e in the script bash, Does it mean if a wrong command in the script it will close or exit the script without continuation thats what happen if i set it in the terminal. Thanks in advance (3 Replies)
Discussion started by: jao_madn
3 Replies

7. UNIX for Dummies Questions & Answers

meaning of <<!

Hi all, I wanna know the meaning of the last word "<<! " sudo su - user <<! please help on this !!!! (1 Reply)
Discussion started by: sudharson
1 Replies

8. Shell Programming and Scripting

Meaning of this line in script

Can anyone explain me the meaning of line #2 in these lines of shell script: if ; then ${EXPR} " ${MACTIONS } " : ".* ${ACTION} " >/dev/null 2>&1 || die "$USAGE" else Sorry in case this is a trivial thing (I am not an expert in this). (3 Replies)
Discussion started by: radiatejava
3 Replies

9. Shell Programming and Scripting

What is the meaning of "tab" in script ?

Hi, GOD bless you every body I have some script to compile a COBOL program - listed bellow - I have many questions about the syntax of this script: 1- There is many "tab" in the script, what does it means? Note: the tab is invisible, so I have colored it into red. 2- The "rm" command is... (3 Replies)
Discussion started by: so_friendly
3 Replies

10. Shell Programming and Scripting

what is the meaning here?

#!/bin/sh $ORACLE_HOME/bin/sqlplus -S $orauserid/$orapasswd@$oradb << _TMP alter session set nls_date_format = 'YYYYMMDD HH24:MI'; set linesize 100 set pagesize 400 ok the above is part of a script..i just wanna know what does sqlplus -S means?? as in why we need to insert the -S behind? (2 Replies)
Discussion started by: forevercalz
2 Replies
Login or Register to Ask a Question