You lost me with your previous reply.
Your original question:
Quote:
Originally Posted by sagar666
i have file in /code/output/test
team=test
wc -l /code/output/$team
getting no file or directory
|
That should work.
Your post after I asked for the complete error message:
Quote:
Originally Posted by sagar666
my output
[root@b16-sn-qa-042 output]# team=test
[root@b16-sn-qa-042 output]# vim test
[root@b16-sn-qa-042 output]# wc -l /code/output/$test
wc: /code/output/: Is a directory
0 /code/output/
[root@b16-sn-qa-042 output]#
|
The 2 examples aren't the same.
In the first one you do
Code:
team=test
wc -l /code/output/$team
in the second you do:
Code:
team=test
wc -l /code/output/$test
The second one will not work, the red part should be
$team
In your latest reply you ask this:
Quote:
Originally Posted by sagar666
what i require is team=test
vim test
Is there any way to see the output by using team instead of test
why because i dont want to see output like this wc -l /code/output/test
|
I assuming you want to do the following:
Code:
$ team=test
$ cat $team
# or
$ vi $team