Skip to main content
Remove unrelated tag.
Link
Ingo Karkat
  • 174k
  • 16
  • 265
  • 341
Improving formatting.
Source Link
Rubens
  • 14.8k
  • 11
  • 68
  • 94

How can I pass arguments to a command in unix? Eg. For example, if I have to open a file, R> vi john/pic/mars/NASA/rover.txt In:

R> vi john/pic/mars/NASA/rover.txt 

In the above vivi command, I want to replace "mars" with a variable, and pass the variable value in the same line. Eg. R> vi john/pic/$variable/NASA/rover.txt | $varaiable=pluto Off-course, as in:

R> vi john/pic/$variable/NASA/rover.txt | $varaiable=pluto 

Of course this doesn't work. But I hope my question is clear. Can Can anyone help me with this?

How can I pass arguments to a command in unix? Eg., if I have to open a file, R> vi john/pic/mars/NASA/rover.txt In the above vi command, I want to replace "mars" with a variable, and pass the variable value in the same line. Eg. R> vi john/pic/$variable/NASA/rover.txt | $varaiable=pluto Off-course this doesn't work. But I hope my question is clear. Can anyone help me with this?

How can I pass arguments to a command in unix? For example, if I have to open a file:

R> vi john/pic/mars/NASA/rover.txt 

In the above vi command, I want to replace "mars" with a variable, and pass the variable value in the same line, as in:

R> vi john/pic/$variable/NASA/rover.txt | $varaiable=pluto 

Of course this doesn't work. But I hope my question is clear. Can anyone help me with this?

Source Link

Passing arguments in unix in command line

How can I pass arguments to a command in unix? Eg., if I have to open a file, R> vi john/pic/mars/NASA/rover.txt In the above vi command, I want to replace "mars" with a variable, and pass the variable value in the same line. Eg. R> vi john/pic/$variable/NASA/rover.txt | $varaiable=pluto Off-course this doesn't work. But I hope my question is clear. Can anyone help me with this?