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)
I want to put text stored in a variable into a file on the 7th line. I'm having trouble with this line:
sed '7i\'$text'' $file
It works perfectly for a single word, but fails if there are two words because of the space. I've tried several forms of quoting and this is the only one that... (2 Replies)
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)
I am having one string like
./usr1/Server/temp/app.env ./usr1/Server/temp/upp/app.env ./usr1/Server/ORIG_temp/app.env ./usr1/Server/ORIG_temp/upp/app.env ./usr1/Server/work_temp_40/app.env ./usr1/Server/work_temp_40/upp/app.env ./usr1/fd/app.env ./usr1/PurgeArchive/app.env ./usr1/bm/bin/app.env... (6 Replies)
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)
Hello everyone,
I work under Ubuntu 11.10 (c-shell)
I need a script to create a new text file whose content is the text of another text files that are in the directory $DIRMAIL at this moment.
I will show you an example:
- On the one hand, there is a directory $DIRMAIL where there are... (1 Reply)
Hi,
I am having trouble while using 'sed' with reading files. Please help. I have 3 files. File A, file B and file C. I want to find content of file B in file A and replace it by content in file C.
Thanks a lot!!
Here is a sample of my question.
e.g. (file A: a.txt; file B: b.txt; file... (3 Replies)
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)
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)
Dear all,
I have a "SQL request" in a file: that request include different "host variable" and I would like to substitute the different "host variable" by their respective content before executing the request.
For example:
$ echo $SHELL
/bin/bash
$ cat dae2.txt
DELETE FROM ... (11 Replies)
Discussion started by: dae
11 Replies
LEARN ABOUT DEBIAN
nmlc
NMLC(1) BSD General Commands Manual NMLC(1)NAME
NMLC -- A compiler from NML code to NFO and/or GRF files.
SYNOPSIS
nmlc [options] [file]
OPTIONS -c Crop extraneous transparent blue from real sprites.
-u Save real sprites uncompressed to GRF files. This saves a lot of time during encoding but it's not recommended when creating a
file for distribution since it makes the output file substantially bigger.
--grf=file Write output in GRF format to <file>.
--nfo=file Write output in NFO format to <file>.
--nml=file Write output in NML format to <file>.
--output=file | -o file
Write output to <file>. The output type is detected from the extension of the filename. It must be one of nfo, nml or grf.
--debug | -d
Print a dump of the AST to stdout.
--help | -h
Print usage information.
--stack | -s
Dump stack when an error occurs
--custom-tags=file | -t file
Load custom tags from <file> [default: custom_tags.txt]
--lang-dir=dir | -l dir
Load language files from directory <dir> [default: lang]
--default-lang=file
The default language is stored in <file> [default: english.lng]
--sprites-dir=dir | -a dir
Store 32bpp sprites in directory <dir> [default: sprites]
--start-sprite=file
Set the first sprite number to write (do not use except when you output nfo that you want to include in other files).
--palette=palette | -p palette
Force nml to use the palette <pal> [default: ANY]. Valid values are 'DOS', 'WIN', 'ANY'.
SEE ALSO
The language reference at http://hg.openttdcoop.org/nml/raw-file/tip/docs/index.html
AUTHOR
NML was written by Albert Hofkamp, Jasper Reichardt, Ingo von Borstel, Jose Soler and Thijs Marinussen.
This manual page was written by Thijs Marinussen.
June 18, 2011