0

Hello,
I was trying to combine some commands but having a little trouble.
In a single command I want to call the script dvdcoll2 and accept input from dvdcoll1. Then I want to put stdout into dvdcoll3, and stderr into dvderror. How do I string together four commands in a single line?
This is the loop I keep getting myself into:
cat dvdcoll2 < dvdcoll1 > stdout > dvdcoll3 | stderr > dvderror

Then I want to write a command line using pipes that displays all of the entries in the /etc/passwd file that contain the string smith. Is it possible to use another command that doesn't use pipes?

Thanks for any help

Edited by harpoon35

2
Contributors
4
Replies
5
Views
5 Years
Discussion Span
Last Post by Watael
0

would
cat dvdcoll2 < dvdcoll1 > dvdcoll3 2>dvderror
work for this type of script?

Edited by harpoon35

0

hi,

yes, it seems correct; exept the cat that has nothing to do here.
note that dvdcoll* scripts have to be under some directory in the PATH, or you'll have to give their path.

about parsing /etc/passwd: do you have getent installed?

0

Trying to use it with standard commands.
These work:
cat /etc/passwd | grep "smith" (with pipe)
grep smith /etc/passwd (without)
But I'm having trouble geting it to work without grep... Any suggestions, and thanks for looking at it.

Edited by harpoon35

0

I'm having trouble geting it to work without grep...

not very precise, please be more explicit.

the shell alone can do it; or you could use sed, or awk, or perl, python...

Edited by Watael

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.