Append and redirect


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Append and redirect
# 1  
Old 07-06-2001
Append and redirect

Can somebody please explain to me what redirection (>) and append are? What is the difference between > and >>?

Thank-you
# 2  
Old 07-06-2001
Hi,

If you use > to redirect output to a file a new file will always be created:

Using >> to redirect output to a file will only create a new file if the file doesn't exist, if the file exists then the output will be appended to the end of the file.

Andy Hibbins Smilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Ftp redirect

Hi i want to redirect a list of ftp file to an exsisting file by mls x.txt mylocalfile.txt result of this command corrupt my data on mylocalfile.txt , please help me (2 Replies)
Discussion started by: rezasadeghi
2 Replies

2. UNIX for Dummies Questions & Answers

How to append a string by cat and redirect to other file?

Hi, when I do cat for kernel parameters cat /proc/sys/kernel/sem >> /etc/sysctl.conf 4096 4096 32 128 The above command working with out any doubt but I want to pass it like below, need to append "kernel.sem =" and pass it to /etc/sysctl.conf kernel.sem = 4096... (2 Replies)
Discussion started by: stew
2 Replies

3. Shell Programming and Scripting

Problem with << redirect - Please help!

I have a script to send an email like below. Problem is, the if ..fi block is not getting executed, and is coming as a part of the email body. Can anyone take a look at this? :confused: Log file shows this: SEND_MAIL.prog: line 64: : command not found echo "Input Parameters" echo... (11 Replies)
Discussion started by: mansmaan
11 Replies

4. Shell Programming and Scripting

Redirect capitalize

How do i send the output from the date command to a variable called today easy: today=$(date) but how can the output be capitalized on a single command ? (2 Replies)
Discussion started by: JuankyKong
2 Replies

5. Web Development

URL Redirect

Just want to give a background. Currently, our company web site is redesigned and there are about 200 current URLs will have new redirects. I don't want to enter them in the config file rather would like to have them in a text file/config file and referring the file from the config whenever the... (2 Replies)
Discussion started by: jawak
2 Replies

6. Shell Programming and Scripting

Redirect Problem

Hi, I have perl script which is calling an external command using "system()" with argument. But i am not able to capture the output.Even tried with backtick also with no luck. . . $number=<>; system ("cmd $number >output.txt"); (2 Replies)
Discussion started by: rasingraj
2 Replies

7. UNIX for Dummies Questions & Answers

Sendmail MX redirect

Hi I have a working sendmail setup for my domain, but would like to run a subdomain on another machine. I could try below, but its a production server and worry about messing it up. Hence the question. So I have machine names: mydomain.com (mail server) dev.mydomain.com currently the... (1 Reply)
Discussion started by: gtrava01
1 Replies

8. Shell Programming and Scripting

Redirect output

Hi all, I have a script which call a java program, the logging (to log file) in the program is done using log4j. However, as a safety measure, i still choose to direct standard error to another log file as follow /usr/bin/java -classpath ${classpath} -Xmx128m TestingProgram 2>>... (1 Reply)
Discussion started by: mpang_
1 Replies

9. UNIX for Dummies Questions & Answers

how do redirect in bind

Hello all! Does anyone know how to redirect i link to a host or alias name? Here is the example: i wank to type "Bob" in my browser and be redirected to http://192.168.54.37:7001/Bob/BobMainServlet on that perticular port. Im using Redhat 6.2 with bind 9.2.3 regards... dOzY (4 Replies)
Discussion started by: dozy
4 Replies

10. IP Networking

Redirect

I'm sittig behind a firewall that doesn't allow ftp. I have a conection to a UNIX system, connecting throug SSH. Is it possible to redirect the ftp through the UNIX to my computer? (1 Reply)
Discussion started by: <Therapy>
1 Replies
Login or Register to Ask a Question