Sponsored Content
Top Forums Shell Programming and Scripting Replacement of variable by their content in a file Post 302985116 by dae on Saturday 5th of November 2016 09:49:16 AM
Old 11-05-2016
Thanks to all of you ... Scrutinizer and RudiC, your suggestions are solving my problem ! Smilie
RudiC, I think your suggestion is quite similar to the Scrutinizer's proposal, right ? ... Maybe, is there an advantage that I can not see ?

Thanks again,

Didier.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

redirecting variable content to a file!

Hello! I'm having problems trying to extract the contents of a variable and placing it into a text file. Grateful for any help. Been trying something along the lines of: $variable > file.txt or `cat < $variable` > file.txt As you can see I'm a newbie to this :D (2 Replies)
Discussion started by: lloowen
2 Replies

2. UNIX for Dummies Questions & Answers

How to assign the content of a file to a variable?

Hi all, I have a problem here. I have a file and let we take the content of the file is just '32' (only a numeric value in that file). Now I need to assign this numeric value ( value in that file) to a variable. Is that possible? If so, can you plz advice me on this? Thanks in... (4 Replies)
Discussion started by: iamgeethuj
4 Replies

3. Shell Programming and Scripting

Variable of Content From Part of Other File

I may not being doing this description justice, but I'll give it a try. I created a mailx script; there will be several messages using the same script where the only difference is the content. So I figured I'd make the content of the message a variable retrieved from a separate file. I have five... (5 Replies)
Discussion started by: royarellano
5 Replies

4. Shell Programming and Scripting

How to put content of file into a variable?

For example, I have a simple text file note: this a note a simple note a very very simple notewhen I use this command, temp=$(cat "note.txt")then I echo temp, the result is in one line. echo $temp note: this a note a simple note a very very simple noteMy variable doesn't have newline. How... (7 Replies)
Discussion started by: 14th
7 Replies

5. Shell Programming and Scripting

cut the variable from the line and use it to find the file and read the content of that file

Hi, I am working on one script..I am having files in the below format file 1 (each line is separated with : delimeter) SPLASH:SPLASH:SVN CIB/MCH:MCH:SVN Now I want from file 1 that most left part of the first line will store in... (6 Replies)
Discussion started by: rohit22hamirpur
6 Replies

6. HP-UX

XML tag name content replacement

Hi, Need to replace an XML tag name contents, please provide any suggestions. Scenario is : <abc_def>Value_some_content</abc_def> Expected output : <abc:def>Value_some_content</abc:def> We have many tag with different names & contents in a file or a string. Please help on the... (3 Replies)
Discussion started by: periyasamycse
3 Replies

7. Shell Programming and Scripting

sed replacement in file when line is in a variable

Hi, I have a file where I want to replace the 15th field separated by comma, only on specific lines matching lots of different conditions. I have managed to read the file line by line, within the loop my line is held in a variable called $line I assume this will be using sed (maybe... (5 Replies)
Discussion started by: jpt123
5 Replies

8. Shell Programming and Scripting

Variable resolution in File content

I have a file File1 containing lines like below apple ${FRUIT}-Color orange ${FRUIT}-Color banana ${FRUIT}-Color Now, in my shell I'm reading the file like below while read FRUIT DESC; do echo $FRUIT $DESC; done < File1 which outputs - apple ${FRUIT}-Color orange ${FRUIT}-Color... (3 Replies)
Discussion started by: nexional
3 Replies

9. UNIX for Dummies Questions & Answers

Getting ls content into a file using variable

hi i just cant figure out how can i do this ls -lt > log.txt using $PWD what i mean is how can i get the ls command content into a file using $PWD variable? :confused: (4 Replies)
Discussion started by: chinababy
4 Replies

10. Shell Programming and Scripting

sed - replacement file path with variable - Escaping / character

Hi,, I have the line below in a file: $!VarSet |LFDSFN1| = '"E:\APC\Trials\20140705_427_Prototype Trial\Data\T4_20140705_Trial_Cycle_Data_13_T_Norm.txt" "VERSION=100 FILEEXT=\"*.txt\" FILEDESC=\"General Text\" "+""+"TITLE{SEARCH=NONE NAME=\"New Dataset\" LINE=1I want to write a script to change... (2 Replies)
Discussion started by: carlr
2 Replies
rzip(1) 																   rzip(1)

NAME
rzip - a large-file compression program SYNOPSIS
rzip [OPTIONS] <files...> DESCRIPTION
rzip is a file compression program designed to do particularly well on very large files containing long distance redundancy. OPTIONS SUMMARY
Here is a summary of the options to rzip. -0, --worst fastest (worst) compression -6 default compression level -9, --best slowest (best) compression -d, --decompress decompress -f, --force force overwrite of any existing files -o, --output FILENAME specify the output file name -k, --keep keep existing files -L, --level LEVEL set compression level -P, --progress show compression progress -S, --suffix SUFFIX specify compressed suffix (default '.rz') -v, --verbose increase verbosity -V, --version show version OPTIONS
-h --help Print an options summary page -V --version Print the rzip version number -0 (or --worst) to -9 (or --best) --level Set the compression level from 0 to 9. The default is to use level 6, which is a reasonable compromise between speed and compres- sion. The compression level is also strongly related to how much memory rzip uses, so if you are running rzip on a machine with limited amounts of memory then you will probably want to choose a smaller level. -d --decompress Decompress. If this option is not used then rzip looks at the name used to launch the program. If it contains the string 'runzip' then the -d option is automatically set. -o --output Set the output file name. If this option is not set then the output file name is chosen based on the input name and the suffix. The -o option cannot be used if more than one file name is specified on the command line. -S --suffix Set the compression suffix. The default is '.rz'. -f --force If this option is not specified then rzip will not overwrite any existing files. If you set this option then rzip will silently overwrite any files as needed. -k --keep If this option is not specified then rzip will delete the source file after successful compression or decompression. When this option is specified then the source files are not deleted. -P --progress If this option is specified then rzip will show the percentage progress while compressing. INSTALLATION
Just install rzip in your search path. COMPRESSION ALGORITHM
rzip operates in two stages. The first stage finds and encodes large chunks of duplicated data over potentially very long distances (up to nearly a gigabyte) in the input file. The second stage is to use a standard compression algorithm (bzip2) to compress the output of the first stage. The key difference between rzip and other well known compression algorithms is its ability to take advantage of very long distance redun- dency. The well known deflate algorithm used in gzip uses a maximum history buffer of 32k. The block sorting algorithm used in bzip2 is limited to 900k of history. The history buffer in rzip can be up to 900MB long, several orders of magnitude larger than gzip or bzip2. It is quite common these days to need to compress files that contain long distance redundancies. For example, when compressing a set of home directories several users might have copies of the same file, or of quite similar files. It is also common to have a single file that contains large duplicated chunks over long distances, such as pdf files containing repeated copies of the same image. Most compression pro- grams won't be able to take advantage of this redundency, and thus might achieve a much lower compression ratio than rzip can achieve. HISTORY
The ideas behind rzip were first implemented in 1998 while I was working on rsync. That version was too slow to be practical, and was replaced by this version in 2003. BUGS
Unlike most Unix compression programs, rzip cannot compress or decompress to or from standard input or standard output. This is due to the nature of the algorithm that rzip uses and cannot easily be fixed. CREDITS
Thanks to the following people for their contributions to rzip o Paul Russell for many suggestions and the debian packaging o The authors of bzlib for an excellent library AUTHOR
rzip was written by Andrew Tridgell http://samba.org/~tridge/ If you wish to report a problem or make a suggestion then please email bugs-rzip@tridgell.net rzip is released under the GNU General Public License version 2 or later. Please see the file COPYING for license details. October 2003 rzip(1)
All times are GMT -4. The time now is 03:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy