How to execute command+parameters in a Linux C Shell script

I would like to incorporate the following in my C Shell script.
packager --input-file=G:\Testing\test.txt --output-path=G:\Testing\out.txt duration=4

“Packager” is an executable command from a third party program. –input  and –output are parameters that can be passed to “Packager”

How do I execute the command and parameters  form a C Shell script?
What’s the correct syntax ?

Please bear in mind that this is just a part of a bigger C Shell script
wademiAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

woolmilkporcCommented:
The statement is nearly correct.
Just escape the backslashes with a second one or put single quotes around the parameters ('--input-file...'
0
wademiAuthor Commented:
But how does c chell know that packager is an actual command
0
woolmilkporcCommented:
The shell will search for it in your PATH if it's not a shell builtin or a shell syntax element (which it isn't).

To be really sure you could add the full path (/path/to/packager)
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

wademiAuthor Commented:
so just enter the command as is in my C Shell script?

Example:

path/packager `--input-file=G:\Testing\test.tx`t `--output-path=G:\Testing\out.tx`t `duration=4`
0
woolmilkporcCommented:
By the way - Linux does not use Windows-style paths as in your Q.
Where did you get them from?
0
wademiAuthor Commented:
I know the path is different. I have to do this project in both linux and windows. was the above sytax correct using / slash
0
woolmilkporcCommented:
An absolute path starts with a slash.

/path/packager '--input-file=G:\Testing\test.txt' '--output-path=G:\Testing\out.txt' 'duration=4'

Please use just single quotation marks ( 'apostrophe' ) not accents or the like.

Or do it this way:

/path/packager --input-file=G:\\Testing\\test.txt  --output-path=G:\\Testing\\out.txt  duration=4

Note: No quotes, but double backslashes.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.