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

Recommended Answers

All 4 Replies

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

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?

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.

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...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.