05-06-2014
You can group them with { ... ; } or ( ... ) or you can use exec.
Regards,
Alister
This User Gave Thanks to alister For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Ahhhrrrggg I'm having a brain fart...
I want to take the output of a command and redirect it to a file...
This works....
$ man cp | cat >> copy_help
but this doesn't
keytool -help |cat >> keytool_help
It just produces... these lines...
more keytool_help
] ...
... (11 Replies)
Discussion started by: jimmyc
11 Replies
2. HP-UX
Hello,
I am New to Unix.
I am Using HP-UX 9000 Series for my Application.
I am Currently Facing an Issue that the error messages are being written in the syslog file instead of the Application Log File. The Codes for that Syslog.h is written in Pro*C.
I want to know how to Redirect these... (3 Replies)
Discussion started by: balasubramaniam
3 Replies
3. UNIX for Dummies Questions & Answers
Hi all!!
is possible to assign the output of some command to filename, i.e.
grep_output.txt
Otherwise, I want to open a new file which name is inside another, how can I do it?
Thanks a lot! (7 Replies)
Discussion started by: csecnarf
7 Replies
4. HP-UX
how to redirect the growing contents of log file to another file in unix (2 Replies)
Discussion started by: megh
2 Replies
5. Shell Programming and Scripting
hi i have two file
a.txt
123,b,c,d,e
111,c,d,e,f,
456,a,k,j,h
b.txt
123
678
987
321
456
i want to compare these two files(match content of b first coloum with a ) and o/p should be like
123,d,e
456,j,h
pls help.....:) (7 Replies)
Discussion started by: anish19
7 Replies
6. Shell Programming and Scripting
Okay, this is what I have and what I need.
top -p 11111 >> test.txt
Unfortunately, when I do that in a script, when I run my next command, could be just an 'ls -l' it says that the process stops and it doesn't write to the test.txt file anymore.
I guess the first part isn't as big of a... (5 Replies)
Discussion started by: cbo0485
5 Replies
7. Shell Programming and Scripting
Hi,
I have a file with a size of 10 mb and I need to redirect some specific lines to a new files. For eg.
Executed Restore for 11227.EDCS.551.01.201110 from /tmp/bk/restore/CR81500/content/S24U15VA2.2010-10-29.16:49.EDT/ArchiveFile_11227.EDCS.551.01.201110.zip
Operation output:
<U+FEFF>Oct... (4 Replies)
Discussion started by: gsiva
4 Replies
8. Shell Programming and Scripting
I have the following:
remsh $host -n 2>>syslog_issue_list.txt grep -i -e "EMS" -e "error" -e "warning" -e "excessive" /var/adm/syslog/syslog.log |
awk /"$DATE1"/ | awk -vhost="$host" '!/remsh|telnetd/{print host "\n", $0 >> "syslog_issue_list.txt"}'
I am creating a health script that has... (4 Replies)
Discussion started by: chipblah84
4 Replies
9. Shell Programming and Scripting
I have shell script generate.sh that has
var="HP-UX"
I am following example 19-8 in the below document.
Here Documents
The output.txt is generated however I want the value of variable var to be reflected in the contents of the output.txt file
cat <<'EOF' #!/bin/bash
connect("Welcome... (1 Reply)
Discussion started by: mohtashims
1 Replies
10. Shell Programming and Scripting
Hi ,
i am having an file which contains 5 file_name data, i need to read the file name and will perform certain operation and generate out file names with named as 5 individual file_names
for eg:
file.txt contains
file_name1.txt|hai
file_name2.txt|bye
file_name3.txt|how... (3 Replies)
Discussion started by: rohit_shinez
3 Replies
LEARN ABOUT DEBIAN
cgi::application::plugin::redirect
CGI::Application::Plugin::Redirect(3pm) User Contributed Perl Documentation CGI::Application::Plugin::Redirect(3pm)
NAME
CGI::Application::Plugin::Redirect - Easy external redirects in CGI::Application
SYNOPSIS
package My::App;
use CGI::Application::Plugin::Redirect;
sub cgiapp_prerun {
my $self = shift;
if ( << not logged in >> ) {
return $self->redirect('login.html');
}
}
sub byebye {
my $self = shift;
return $self->redirect('http://www.example.com/', '301 Moved Permanently');
}
DESCRIPTION
This plugin provides an easy way to do external redirects in CGI::Application. You don't have to worry about setting headers or worrying
about return types, as that is all handled for you.
"redirect" does an external redirect, which means that the browser will receive a command to load a new page, and a fresh request will come
in. If you just want to display the results of another runmode within the same module, then it is often sufficient to use the "forward"
method in CGI::Application::Plugin::Forward instead.
METHODS
redirect($url, $status)
Interupt the current request, and redirect to an external URL. If you happen to be inside a prerun method when you call this, the current
runmode will automatically be short circuited so that it will not execute. As soon as all prerun method have finished, the redirect will
happen without the runmode being executed.
The $status parameter is optional as the CGI module will default to something suitable.
return $self->redirect('http://www.example.com/');
- or -
return $self->redirect('http://www.example.com/', '301 Moved Permanently');
SEE ALSO
CGI::Application, CGI::Application::Plugin::Forward, perl(1)
AUTHOR
Cees Hek <ceeshek@gmail.com>
LICENCE AND COPYRIGHT
Copyright (c) 2005, Cees Hek. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
DISCLAIMER OF WARRANTY
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT
WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESSED ORIMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSESSUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
perl v5.12.3 2011-06-25 CGI::Application::Plugin::Redirect(3pm)