10-02-2011
ok so this program greps the file $p for the parameter that the user enters and outputs some modified text with sed.
grep $1 $p|sed s/.*=.//|sed 's/<.*//'
this program greps the parameters the user enters in the file $q and cuts out a certain column that i want
grep "$*" $q|cut -c77-78
now what i want to do is take the output from the second program and use it as the parameter in program 1. Make sense?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
How to achieve this? Let us assume the following:
There are 2 scripts a.ksh and b.ksh
$ cat a.ksh
sh b.sh 2>&1 >> /work/log/a_log.txt
$ cat b.sh
echo "abcd"
My requirement is, is there a way to display this abcd in standard output also alongside of writing into a_log.txt?... (8 Replies)
Discussion started by: vigneshra
8 Replies
2. Shell Programming and Scripting
Hi,
I want to move the output of a command/script to a file as well as to to be displayed on stdout.
Can anybody help me in this. Thanks in advace ..
-Chanakya M (1 Reply)
Discussion started by: Chanakya.m
1 Replies
3. Shell Programming and Scripting
Hi all
I would like to open a SQL session from within a shell script and then redirect the output of the SQL command to a file.
e.g.
#!/bin/bash
sqlplus "/ as sysdba" <<EOF
@$HOME/recovery_space.sql
EOF
I want to redirect the output of the SQL command to a temp file, because... (2 Replies)
Discussion started by: soliberus
2 Replies
4. Shell Programming and Scripting
Hello...I'm having problems redirecting output from a script from a mailbot. It is a perl script that has the email sent to op_shipper piped into it.
I am receiving the email with sendmail and here is what my alias looks like for the script am I having problems with in /etc/aliases:
... (3 Replies)
Discussion started by: kuliksco
3 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I want to redirect my script output to more than one file without printing the result to the screen. How to do that?
ex:
echo "hi" >> a.txt b.txt
cat a.txt
hi b.txt
:confused: (2 Replies)
Discussion started by: boopathyvasagam
2 Replies
6. Shell Programming and Scripting
I am trying to filter records based on number of "|", delimiter in my application. If number of "|" is greater than 14 its a bad record, else its a good record. I have to redirect output to two different files based on the if-then-else evaluation in AWK.
if number of “|” in file_0 > 14
... (2 Replies)
Discussion started by: siteregsam
2 Replies
7. Shell Programming and Scripting
When ever i started my terminal,Every time I have to change the directory like "cd user/documents/ravi/folder2/folder3" Without typing this entire command every time ,I placed "alias c='cd user/documents/ravi/folder2/folder3'" in .bash_profile file. so that i can able to execute command 'c'... (6 Replies)
Discussion started by: Raviteja saddal
6 Replies
8. Shell Programming and Scripting
Hi All,
I am trying to redirect output for every line in a korn shell script that is going to generate output and append it to a log file.
I have been doing this after EACH and every line that is going to produce output:
command 1 >> test.log
command 2 >> test.log
command 3 >>... (5 Replies)
Discussion started by: MIA651
5 Replies
9. Shell Programming and Scripting
Hello All,
I have some unique requirement.
I have written a very lengthy script which calls number of resource script to execute a particular task.
What I want is output of each command(called from main script and resource scripts) should go to a... (3 Replies)
Discussion started by: anand.shah
3 Replies
10. Shell Programming and Scripting
For example,
if we run the below command,
symcfg list -thin -pool , results in an output most of the times and if the out is generated i'm able to redirect the output to a file. but sometimes it doesnt result any output and even though the output is being redirected, i can see "No Thin Pools "... (2 Replies)
Discussion started by: web2moha
2 Replies