devexpress asp.net pdf viewer : Export pages from pdf online application Library tool html .net wpf online AppleShellScripting-20142-part656

Writingashellscriptislikeridingabike.Youfalloffandscrapeyourkneesalotatfirst.Withabitmore
experience,youbecomecomfortableridingthemaroundtown,butalsoquicklydiscoverwhymostpeople
drivecarsforlongertrips.
Shellscriptingisgenerallyconsideredtobeagluelanguage,idealforcreatingsmallpiecesofcodethatconnect
othertoolstogether.Whileshellscriptscanbeusedformorecomplextasks,theyareusuallynotthebest
choice.
Ifyouhaveeversuccessfullytruedabicyclewheel(orpaidsomeoneelsetodoso),that’ssimilartolearning
thebasicsofshellscripting.Ifyoudon’ttrueyourscripts,theywobble.Putanotherway,itisofteneasyto
writeascript,butitcanbemorechallengingtowriteascriptthatconsistentlyworkswell.
Thischapterandthenexttwochaptersintroducethebasicconceptsofshellscripting.Theremainingchapters
inthisdocumentprovideadditionalbreadthanddepth.Thisdocumentisnotintendedtobeacomplete
referenceonwritingshellscripts,norcoulditbe.Itdoes,however,provideagoodstartingpointforbeginners
firstlearningthisblackart.
ShellScriptDialects
Therearemanydifferentdialectsofshellscripts,eachwiththeirownquirks,andsomewiththeirownsyntax
entirely.Becauseofthesedifferences,theroadtogoodshellscriptingcanbefraughtwithperil,leadingto
scriptfailures,misbehavior,andevenoutrightdataloss.
Tothatend,thefirstlessonyoumustlearnbeforewritingashellscriptisthattherearetwofundamentally
differentsetsofshellscriptsyntax:theBourneshellsyntaxandtheCshellsyntax.TheCshellsyntaxismore
comfortabletomanyCprogrammersbecausethesyntaxissomewhatsimilar.However,theBourneshellsyntax
issignificantlymoreflexibleandthusmorewidelyused.Forthisreason,thisdocumentonlycoverstheBourne
shellsyntax.
ThesecondhardlessonyouwillinvariablylearnisthateachdialectofBourneshellsyntaxdiffersslightly.This
documentincludesonlypureBourneshellsyntaxandafewBASH-specificextensions.WhereBASH-specific
syntaxisused,itisclearlynoted.
2014-03-10   |   Copyright © 2003, 2014 Apple Inc. All Rights Reserved.
21
Shell Script Basics
Export pages from pdf online - application Library tool:C# PDF Page Extract Library: copy, paste, cut PDF pages in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Easy to Use C# Code to Extract PDF Pages, Copy Pages from One PDF File and Paste into Others
www.rasteredge.com
Export pages from pdf online - application Library tool:VB.NET PDF Page Extract Library: copy, paste, cut PDF pages in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
Detailed VB.NET Guide for Extracting Pages from Microsoft PDF Doc
www.rasteredge.com
Theterminologyandsubtlesyntacticdifferencescanbeconfusing—evenabitoverwhelmingattimes;had
DorothyinTheWizardofOzbeenaprogrammer,youmighthaveheardherexclaim,"BASHandZSHandCSH,
OhMy!"Fortunately,onceyougetthebasics,thingsgenerallyfallintoplaceaslongasyouavoidusing
shell-specificfeatures.Stayonthenarrowroadandyourcodewillbeportable.
Somecommonshellsarelistedbelow,groupedbyscriptsyntax:
Bourne-compatibleshells
sh
bash
zsh
ksh
C-shell-compatibleshells
csh
tcsh
bcsh
(CshelltoBourneshelltranslator/emulator)
Manyoftheseshellshavemorethanonevariation.Mostofthesevariationsaredenotedbyprefixingthename
ofanexistingshellwithadditionallettersthatareshortforwhateverdifferentiatesthemfromtheoriginal
shell.Forexample:
Theshell
pdksh
isavariantof
ksh
.BeingapublicdomainrewriteofAT&T's
ksh
,itstandsfor"Public
DomainKornSHell."(Thisisabitofamisnomer,asafewbitsareunderaBSD-likeopensourcelicense.
However,thenameremains.)
Theshell
tcsh
isanextensionof
csh
.ItstandsfortheTENEXCSHell,assomeofitsenhancementswere
inspiredbytheTENEXoperatingsystem.
Theshell
bash
isanextensionof
sh
.ItstandsfortheBourneAgainSHell.(Oddlyenough,itisnotavariation
of
ash
,theAlmquistSHell,thoughbothareBourneshellvariants.Thisshouldnotbeconfusedwiththe
dash
shell—an
ash
-derivedshellusedinsomeLinuxdistributions—whosenamestandsfortheDebian
AlmquistSHell.)
Andsoon.Ingeneral,withtheexceptionof
csh
and
tcsh
,itisusuallysafetoassumethatanymodernlogin
shelliscompatiblewithBourneshellsyntax.
ShellScriptBasics
ShellScriptDialects
2014-03-10   |   Copyright © 2003, 2014 Apple Inc. All Rights Reserved.
22
application Library tool:C# HTML5 PDF Viewer SDK to convert and export PDF document to
An advanced PDF converter tool, which supports to be integrated in .NET project, and compatible with all Windows Export multiple pages PDF document to
www.rasteredge.com
application Library tool:VB.NET PDF - Convert PDF Online with VB.NET HTML5 PDF Viewer
An advanced PDF converter tool, which supports to be integrated in .NET project, and compatible with all Windows Export multiple pages PDF document to
www.rasteredge.com
Note:  BecausetheCshellsyntaxisnotwellsuitedtoscriptingbeyondaverybasiclevel,this
documentdoesnotcoverCshellvariantsindepth.Formoreinformation,seeSheSellsCShells (page
23).
SheSellsCShells
TheCshellispopularamongsomeusersasashellforinteractingwiththecomputerbecauseitallowssimple
scriptstobewrittenmoreeasily.However,theCshellscriptinglanguageislimitedinanumberofways,many
ofwhicharehardtoworkaround.Forthisreason,useoftheCshellscriptinglanguageforwritingcomplex
scriptsisnotrecommended.Formoreinformation,read“CSHProgrammingConsideredHarmful”at
http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/.Althoughmanyofthelanguageflawsitdescribesare
fixedbysomemodernCshells,ifyouarewritingascriptthatmustworkonmultiplecomputersacrossdifferent
operatingsystems,youcannotalwaysguaranteethattheinstalledCshellwillsupportthoseextensions.
However,theCshellscriptinglanguagehasitsuses,particularlyforwritingscriptsthatsetupenvironment
variablesforinteractiveshellenvironments,executeahandfulofcommandsinorder,orperformotherrelatively
lightweightchores.Tosupportsuchuses,theCshellsyntaxispresentedalongsidetheBourneshellsyntax
withinthis"basics”chapterwherepossible.
Outsideofthischapter,thisdocumentdoesnotgenerallycovertheCshellsyntax.Ifafterreadingthis,you
stillwanttowriteamorecomplexscriptusingtheCshellprogramminglanguage,youcanfindmoreinformation
inontheCshellinthemanualpagefor
csh
.
ShellVariablesandPrinting
Whatfollowsisaverybasicshellscriptthatprints“Hello,world!”tothescreen:
#!/bin/sh
echo "Hello, world!"
Thefirstthingyoushouldnoticeisthatthescriptstartswith‘
#!
’.Thisisknownasaninterpreterline.Ifyou
don’tspecifyaninterpreterline,thedefaultisusuallytheBourneshell(
/bin/sh
).However,itisbesttospecify
thislineanywayforconsistency.
ShellScriptBasics
SheSellsCShells
2014-03-10   |   Copyright © 2003, 2014 Apple Inc. All Rights Reserved.
23
application Library tool:VB.NET PDF - Convert PDF with VB.NET WPF PDF Viewer
document. Create multiple pages Tiff file from PDF document. Export PDF text content to TXT file with original layout. Convert
www.rasteredge.com
application Library tool:C# WPF PDF Viewer SDK to convert and export PDF document to other
NET project. Create multiple pages Tiff file from PDF document. Export PDF text content to TXT file with original layout. Convert PDF
www.rasteredge.com
Thesecondthingyoushouldnoticeisthe
echo
command.The
echo
commandisnearlyuniversalinshell
scriptingasameansforprintingsomethingtotheuser’sscreen.(Technicallyspeaking,
echo
isgenerallya
shellbuiltin,butitalsoexistsasasstandalonecommand,
/bin/echo
.Youcanreadmoreaboutthedifference
betweenthebuiltinversionandthestandaloneversioninecho (page 154)andUseShellBuiltinsWherever
Possible (page 231).)
Ifyou’dlike,youcantrythisscriptbysavingthoselinesinatextfile(say“hello_world.sh”)inyourhome
directory.Then,inTerminal,type:
chmod u+x hello_world.sh
./hello_world.sh
Ofcourse,thisscriptisn’tparticularlyuseful.Itjustprintsthewords“Hello,world!“toyourscreen.Tomake
thismoreinteresting,thenextscriptthrowsinafewvariables.
#!/bin/sh
FIRST_ARGUMENT="$1"
echo "Hello, world $FIRST_ARGUMENT!"
Typeorpastethisscriptintothetexteditorofyourchoice(seeCreatingTextFilesinYourHomeDirectory (page
18)forhelpcreatingatextfile)andsavethefileinyourhomedirectoryinafilecalled
test.sh
.
Onceyouhavesavedthefileinyourhomedirectory,type‘
chmod a+x test.sh
’inTerminaltomakeit
executable.Finally,runitwith‘
./test.sh leaders
’.Youshouldsee“Hello,worldleaders!”printedtoyour
screen.
Thisscriptprovidesanexampleofavariableassignment.Thevariable
$1
containsthefirstargumentpassed
totheshellscript.Inthisexample,thescriptmakesacopyandstoresitintoavariablecalled
FIRST_ARGUMENT
,
thenprintsthatvariable.
Youshouldimmediatelynoticethatvariablesmayormaynotbeginwithadollarsign,dependingonhowyou
areusingthem.Ifyouwanttodereferenceavariable,youprecedeitwithadollarsign.Theshelltheninserts
thecontentsofthevariableatthatpointinthescript.Forallotheruses,youdonotprecedeitwithadollar
sign.
ShellScriptBasics
ShellVariablesandPrinting
2014-03-10   |   Copyright © 2003, 2014 Apple Inc. All Rights Reserved.
24
application Library tool:VB.NET PDF Converter Library SDK to convert PDF to other file
PDF Export. |. Home ›› XDoc.PDF ›› VB.NET PDF: PDF Export. One is to convert and render selected PDF pages or files to desired document and image formats
www.rasteredge.com
application Library tool:C# PDF Converter Library SDK to convert PDF to other file formats
Online C# source code for convert PDF to various document and Support to convert multi-page PDF file to multi-page Able to export PDF document to HTML file.
www.rasteredge.com
Important:  Yougenerallydonotwanttoprefixthevariableontheleftsideofanassignmentstatement
withadollarsign.Because
FIRST_ARGUMENT
startsoutempty,ifyouusedadollarsign,thefirstline:
$FIRST_ARGUMENT="$1" # DO NOT DO THIS!
wouldbeexpandedbytheshellintothefollowingcompletegibberish:
="myfirstcommandlineargument"
Thisisclearlynotwhatyouwant(andproducesanerror).Becauseoftheorderinwhichthestatementis
evaluated,theaboveassignmentstatementwouldstillfailwithanerrorevenif
FIRST_ARGUMENT
were
nonempty.(Ifyoureallywanttoassignavaluetoavariablewhosenameisinadifferentvariable,use
eval
,
asdescribedinUsingtheevalBuiltinforDataStructures,Arrays,andIndirection (page 168).)
Youshouldalsonoticethattheargumenttoechoissurroundedbydoublequotationmarks.Thisisexplained
furtherinthenextsection,UsingArgumentsAndVariablesThatContainSpaces (page 25).
C Shell Note:  ThesyntaxforassignmentstatementsintheCshellisratherdifferent.Insteadofan
assignmentstatement,theCshellusesthe
set
and
setenv
builtinstosetvariablesasshownbelow:
set VALUE = "Four"
# or...
setenv VALUE "Four"
echo "$VALUE score and seven years ago...."
Thefunctionaldifferencebetween
set
and
setenv
isdescribedinExportingShellVariables (page
28).
UsingArgumentsAndVariablesThatContainSpaces
Takeasecondlookatthescriptfromtheprevioussection:
#!/bin/sh
FIRST_ARGUMENT="$1"
echo "Hello, world $FIRST_ARGUMENT!"
ShellScriptBasics
ShellVariablesandPrinting
2014-03-10   |   Copyright © 2003, 2014 Apple Inc. All Rights Reserved.
25
application Library tool:C# WPF PDF Viewer SDK to view, annotate, convert and print PDF in
Create PDF Online. Convert PDF Online. WPF PDF Viewer. RTF. Create PDF from Text. PDF Export. Convert PDF Page: Create Thumbnails. Page: Insert PDF Pages. Page: Delete
www.rasteredge.com
application Library tool:VB.NET PDF- HTML5 PDF Viewer for VB.NET Project
Online. Create PDF Online. Convert PDF Online. WPF PDF Create PDF from Text. PDF Export. Convert PDF to Page: Create Thumbnails. Page: Insert PDF Pages. Page: Delete
www.rasteredge.com
Noticethattheechostatementisfollowedbyastringsurroundedbyquotationmarks.Normally,theshelluses
spacestoseparateargumentstocommands.Outsideofquotationmarks,theshellwouldtreat“Hello,”and
“world”asseparateargumentsto
echo
.
Bysurroundingthestringwithdoublequotemarks,theshelltreatstheentirestringasasingleargumentto
echo
eventhoughitcontainsspaces.
Toseehowthisworks,savethescriptaboveas
test.sh
(ifyouhaven’talready),thentypethefollowing
commands:
./test.sh leaders and citizens
./test.sh "leaders and citizens"
Thefirstlineaboveprints“Hello,worldleaders!”becausethespaceafter“leaders”endsthefirstargument(
$1
).
Insidethescript,thevariable
$1
contains“leaders”,
$2
contains“and”,and
$3
contains“citizens”.
Thesecondlineaboveprints“Hello,worldleadersandcitizens!”becausethequotationmarksonthecommand
linecauseeverythingwithinthemtobegroupedasasingleargument.
Noticealsothattherearesimilarquotationmarksontherightsideoftheassignmentstatement:
FIRST_ARGUMENT="$1"
Withmostmodernshells,thesedoublequotationmarksarenotrequiredforthisparticularassignmentstatement
(becausetherearenoliteralspacesontherightside),buttheyareagoodideaformaximumcompatibility.
SeeHistoricalStringParsing (page 341)inHistoricalFootnotesandArcana (page 341)tolearnwhy.
Whenassigningliteralstrings(ratherthanvariablescontainingstrings)toavariable,however,youmust
surroundanyspaceswithquotationmarks.Forexample,thefollowingstatementdoesnotdowhatyoumight
initiallysuspect:
STRING2=This is a test
Ifyoutypethisstatement,theBourneshellgivesyouanerrorlikethis:
sh: is: command not found
ShellScriptBasics
ShellVariablesandPrinting
2014-03-10   |   Copyright © 2003, 2014 Apple Inc. All Rights Reserved.
26
application Library tool:VB.NET Create PDF from PowerPoint Library to convert pptx, ppt to
Convert multiple pages PowerPoint to fillable and editable PDF Export PowerPoint hyperlink to PDF. Create PDF file from PowerPoint free online without email.
www.rasteredge.com
application Library tool:VB.NET PDF Page Delete Library: remove PDF pages in vb.net, ASP.
Enable specified pages deleting from PDF in Visual Basic .NET class. Free trial SDK library download for Visual Studio .NET program. Online source codes for
www.rasteredge.com
Thereasonforthisseeminglyodderroristhattheassignmentstatementendsatthefirstspace,sothenext
wordafterthatstatementisinterpretedasacommandtoexecute.SeeOverridingEnvironmentVariablesfor
ChildProcesses(BourneShell) (page 30)formoredetails.
Instead,writethisstatementas:
STRING2="This is a test"
Usingquotationmarksisparticularlyimportantwhenworkingwithvariablesthatcontainfilenamesorpaths.
Forexample,typethefollowingcommands:
mkdir "/tmp/My Folder"
FILENAME="/tmp/My Folder"
ls "$FILENAME"
ls $FILENAME
Theaboveexamplecreatesadirectoryin
/tmp
called“MyFolder”.(Don’tworryaboutdeletingitbecause
/tmp
getswipedeverytimeyoureboot.)Itthenattemptstolistthefilesinthatdirectory.Thefirsttime,ituses
quotationmarks.Thesecondtime,itdoesnot.Noticethattheshellmisinterpretsthecommandthesecond
timeasbeinganattempttolistthefilesin
/tmp/My
andthefilesin
Folder
.
HandlingQuotationMarksinStrings
InmodernBourneshells,expansionofvariables,occursafterthestatementitselfisfullyparsedbytheshell.
(SeeHistoricalStringParsing (page 341)inHistoricalFootnotesandArcana (page 341)formoreinformation.)
Thus,aslongasthevariableisenclosedindoublequotemarks,youdonotgetanyexecutionerrorsevenif
thevariable’svaluecontainsdouble-quotemarks.
However,ifyouareusingdoublequotemarkswithinaliteralstring,youmustquotethatstringproperly.For
example:
MYSTRING="The word of the day is \"sedentary\"."
ShellScriptBasics
ShellVariablesandPrinting
2014-03-10   |   Copyright © 2003, 2014 Apple Inc. All Rights Reserved.
27
C Shell Note:  TheCshellhandlingofbackslasheswithindouble-quotedstringsisdifferent.Inthe
Cshell,thepreviousexampleshouldbechangedto:
MYSTRING="The word of the day is "\""sedentary"\""."
./test.sh \""leaders"\"
toachievethedesiredeffect.ThisdifferenceisdescribedfurtherinParsing,VariableExpansion,and
Quoting (page 61).
Thisquotingtechniquealsoappliestoliteralstringswithincommandsenteredonthecommandline.For
example,usingthescriptfromearlierinShellVariablesandPrinting (page 23),thecommand:
./test.sh "\"leaders\""
printsthephrase“Hello,world“leaders”!”
ThedetailsofquotesastheyapplytovariableexpansionareexplainedinParsing,VariableExpansion,and
Quoting (page 61).(Variablesafetywithshellsthatpredatethisbehaviorisgenerallyimpractical.Fortunately,
themodernbehaviorhasbeenthenormsincethemid-1990s.)
Shellscriptsalsoallowtheuseofsinglequotemarks.Variablesbetweensinglequotesarenotreplacedby
theircontents.Besuretousedoublequotesunlessyouareintentionallytryingtodisplaytheactualnameof
thevariable.Youcanalsousesinglequotesasawaytoavoidtheshellinterpretingthecontentsofthestring
inanyway.ThesedifferencesaredescribedfurtherinParsing,VariableExpansion,andQuoting (page 61).
ExportingShellVariables
Onekeyfeatureofshellscriptsisthatvariablesaretypicallylimitedintheirscopetothecurrentlyrunning
script.ThescopingofvariablesisdescribedinmoredetailinSubroutines,Scoping,andSourcing (page 83).
Fornow,though,itsufficestosaythatvariablesgenerallydonotgetpassedontoscriptsortoolsthatthey
execute.
Normally,thisiswhatyouwant.Mostvariablesinashellscriptdonothaveanymeaningtothetoolsthatthey
execute,andthusrepresentclutterandthepotentialforvariablenamespacecollisionsiftheyareexported.
Occasionally,however,youwillfinditnecessarytomakeavariable'svalueavailabletoanoutsidetool.Todo
this,youmustexportthevariable.Theseexportedvariablesarecommonlyknownasenvironmentvariables
becausetheyaffecttheexecutionofeveryscriptortoolthatrunsbutarenotpartofthosescriptsortools
themselves.
ShellScriptBasics
ExportingShellVariables
2014-03-10   |   Copyright © 2003, 2014 Apple Inc. All Rights Reserved.
28
Aclassicexampleofanenvironmentvariablethatissignificanttoscriptsandtoolsisthe
PATH
variable.This
variablespecifiesalistoflocationsthattheshellsearcheswhenexecutingprogramsbyname(withoutspecifying
acompletepath).Forexample,whenyoutype
ls
onthecommandline,theshellsearchesinthelocations
specifiedin
PATH
(intheorderspecified)untilitfindsanexecutablecalled
ls
(orrunsoutoflocations,whichever
comesfirst).
ThedetailsofexportingshellvariablesdifferconsiderablybetweentheBourneshellandtheCshell.Thus,the
followingsectionsexplainthesedetailsinashell-specificfashion.
UsingtheexportBuiltin(BourneShell)
Generallyspeaking,thefirsttimeyouassignavaluetoanenvironmentvariablesuchasthe
PATH
variable,the
Bourneshellcreatesanew,localcopyofthisshellvariablethatisspecifictoyourscript.Anytoolexecuted
fromyourscriptispassedtheoriginalvalueof
PATH
inheritedfromwhateverscript,tool,orshellthatlaunched
it.
WiththeBASHshell,however,anyvariableinheritedfromtheenvironmentisautomaticallyexportedbythe
shell.Thus,insomeversionsofOSX,ifyoumodifyinheritedenvironmentvariables(suchas
PATH
)inascript,
yourlocalchangeswillbeseenautomaticallybyanytoolorscriptthatyourscriptexecutes.Thus,inthese
versionsofOSX,youdonothavetoexplicitlyusethe
export
statementwhenmodifyingthe
PATH
variable.
BecausedifferentBourneshellvariantshandletheseexternalenvironmentvariablesdifferently(evenamong
differentversionsofOSX),thiscreatestwominorportabilityproblems:
Ascriptwrittenwithoutthe
export
statementmayworkonsomeversionsofOSX,butwillfailonothers.
Youcansolvethisportabilityproblembyusingthe
export
builtin,asdescribedinthissection.
Ashellscriptthatchangesvariablessuchas
PATH
willalterthebehaviorofanyscriptthatitexecutes,
whichmayormaynotbedesirable.Youcansolvethisproblembyoverridingthe
PATH
environment
variablewhenyouexecuteeachindividualtool,asdescribedinOverridingEnvironmentVariablesforChild
Processes(BourneShell) (page 30).
Toguaranteethatyourmodificationstoashellvariablearepassedtoanyscriptortoolthatyourshellscript
calls,youmustusethe
export
builtin.Youdonothavetousethiscommandeverytimeyouchangethevalue;
thevariableremainsexporteduntiltheshellscriptexits.
Forexample:
export PATH="/usr/local/bin:$PATH"
# or
PATH="/usr/local/bin:$PATH"
export PATH
ShellScriptBasics
ExportingShellVariables
2014-03-10   |   Copyright © 2003, 2014 Apple Inc. All Rights Reserved.
29
Eitherofthesestatementshasthesameeffect—specifically,theyexportthelocalnotionofthe
PATH
environmentvariabletoanycommandthatyourscriptexecutesfromnowon.Thereisasmallcatch,however.
Youcannotlaterundothisexporttorestoretheoriginalglobaldeclaration.Thus,ifyouneedtoretainthe
originalvalue,youmuststoreitsomewhereyourself.
Inthefollowingexample,thescriptstorestheoriginalvalueofthe
PATH
environmentvariable,exportsan
alteredversion,executesacommand,andrestorestheoldversion.
ORIGPATH="$PATH"
PATH="/usr/local/bin:$PATH"
export PATH
# Execute some command here---perhaps a
# modified ls command....
ls
PATH="$ORIGPATH"
Ifyouneedtofindoutwhetheranenvironmentvariable(whetherinheritedbyyourscriptorexplicitlysetwith
the
export
directive)wassettoemptyorwasneversetinthefirstplace,youcanusethe
printenv
command
toobtainacompletelistofdefinedvariablesanduse
grep
toseeifitisinthelist.(Youshouldnotethat
although
printenv
isacshbuiltin,itisalsoastandalonecommandin
/usr/bin
.)
Forexample:
DEFINED=`printenv | grep -c '^VARIABLE='`
Theresultingvariablewillcontain1ifthevariableisdefinedintheenvironmentor0ifitisnot.
OverridingEnvironmentVariablesforChildProcesses(BourneShell)
BecausetheBASHBourneshellvariantautomaticallyexportsallvariablesinheritedfromitsenvironment,any
changesyoumaketopreexistingenvironmentvariablessuchas
PATH
areautomaticallyinheritedbyanytool
orscriptthatyourscriptexecutes.(ThisisnottrueforotherBourneshellvariants;seeUsingtheexportBuiltin
(BourneShell) (page 29)forfurtherexplanation.)
Whileautomaticexportisusuallyconvenient,youmaysometimeswishtochangeapreexistingenvironment
variablewithoutmodifyingtheenvironmentofanyscriptortoolthatyourscriptexecutes.Forexample,ifyour
scriptexecutesanumberoftoolsin
/usr/local/bin
,itmaybeconvenienttochangethevalueof
PATH
to
include
/usr/local/bin
.However,youmaynotwantchildprocessestoalsolookin
/usr/local/bin
.
ShellScriptBasics
ExportingShellVariables
2014-03-10   |   Copyright © 2003, 2014 Apple Inc. All Rights Reserved.
30
Documents you may be interested
Documents you may be interested