gzip having '&' at the end.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting gzip having '&' at the end.
# 1  
Old 11-30-2009
gzip having '&' at the end.

why do we put & at the end of gzip like below.


Code:
 
ZIPDIR=/HOME/USR
ZIPFILE=11302009.dat
gzip ${ZIPDIR}/${ZIPFILE} &

Thanks in Advance.
# 2  
Old 11-30-2009
To run it in the background, so you can do other things while it's zipping.

Last edited by Scott; 11-30-2009 at 07:19 PM.. Reason: typo
This User Gave Thanks to Scott For This Post:
# 3  
Old 12-01-2009
Absolutely Right by scottn

Actually "&" told to shell to do this process in background,
If u want to look this process use following command.

fg 1

If u want to send this back to background use following command.

^z ie ctrl+z

Best Luck. Smilie


Quote:
Originally Posted by Reddy482
why do we put & at the end of gzip like below.


Code:
 
ZIPDIR=/HOME/USR
ZIPFILE=11302009.dat
gzip ${ZIPDIR}/${ZIPFILE} &

Thanks in Advance.
This User Gave Thanks to vikas898 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need to add a numeric & special char to end of the first line

Need to add a numeric & special char to end of the first line Existing file: 12-11-16|11 2016 Jan 12:34:55|03:55| 13-10-16|10 2016 Jan 12:34:55|03:55|12-11-16|11 2016 Jan 12:34:55|03:55| 14-10-16|19 2016 Jan 12:34:55|03:55|13-11-16|11 2016 Jan 12:34:55|04:55| 15-10-16|18 2016 Jan... (11 Replies)
Discussion started by: Joselouis
11 Replies

2. Shell Programming and Scripting

SFTP Shell Script Get & Delete && Upload & Delete

Hi All, Do you have any sample script, - auto get file from SFTP remote server and delete file in remove server after downloaded. - only download specify filename - auto upload file from local to SFTP remote server and delete local folder file after uploaded - only upload specify filename ... (3 Replies)
Discussion started by: weesiong
3 Replies

3. SCO

Grep to ignore suffix & find end of line

In COBOL, a hyphen can be used in a field name and in a specific program some field names would be identical to others except a suffix was added--sometimes a suffix to a suffix was used. For example, assume I am looking for AAA, AAA-BBB, and AAA-BBB-CCC and don't want to look at AAA-BBB-CCC... (7 Replies)
Discussion started by: wbport
7 Replies

4. UNIX for Dummies Questions & Answers

Print start date to end date, given $1 & $2 in ksh

Dear all, I have an user passing 2 parameter 31/03/2015 and 02/04/2015 to a ksh script. How to print the start date to end date. Expected output is : 31/03/2015 01/04/2015 02/04/2015 Note : 1. Im using aix and ksh 2. I have tried to convert the given input into a date, didnt... (0 Replies)
Discussion started by: mr.rajaravi
0 Replies

5. Gentoo

Help & lead me to the end. VFS: readonly/fs couldn't mount.

In a case of root=/dev/ram0 real_root=/dev/sda2 No filesystem could mount root, tried: ext3 ext2... Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0) http://imageplay.net/img/tya22288136/IMG0204A.jpg (real_root - real panic) The case of omitting real_root and... (1 Reply)
Discussion started by: Xcislav
1 Replies

6. UNIX for Advanced & Expert Users

gzip vs pipe gzip: produce different file size

Hi All, I have a random test file: test.txt, size: 146 $ ll test.txt $ 146 test.txt Take 1: $ cat test.txt | gzip > test.txt.gz $ ll test.txt.gz $ 124 test.txt.gz Take 2: $ gzip test.txt $ ll test.txt.gz $ 133 test.txt.gz As you can see, gzipping a file and piping into gzip... (1 Reply)
Discussion started by: hanfresco
1 Replies

7. Shell Programming and Scripting

Use of Begin IF ,END IF END not working in the sql script

Hi I have written a script .The script runs properly if i write sql queries .But if i use PLSQL commands of BEGIN if end if , end ,then on running the script the comamds are getting printed on the prompt . Ex :temp.sql After connecting to the databse at the sql prompt i type... (1 Reply)
Discussion started by: isha_1
1 Replies

8. Shell Programming and Scripting

PHP read large string & split in multidimensional arrays & assign fieldnames & write into MYSQL

Hi, I hope the title does not scare people to look into this thread but it describes roughly what I'm trying to do. I need a solution in PHP. I'm a programming beginner, so it might be that the approach to solve this, might be easier to solve with an other approach of someone else, so if you... (0 Replies)
Discussion started by: lowmaster
0 Replies

9. Shell Programming and Scripting

Need UNIX shell scripting end to end information

Hi, I would like to learn shell scripting in UNIX. Can any one please give me the support and share the information/documents with me. If any documents please post it to aswanikumar_nimmagadda@yahoo.co.in Thanks in advance...!!! (3 Replies)
Discussion started by: aswani_n
3 Replies
Login or Register to Ask a Question