Hi all,
I've been trying to get this to work for ages to no avail. I've searched this site and googled but cannot find a satisfactory answer.
I've got a while loop, like this
while read line
do
echo "$line"
done < file_name
Now, my problem is that most of the lines in the file... (3 Replies)
Hmmm... Bash doesn't parse whitespace with a read.
lev@sys09:~$ read line; echo "$line"
test
test
You can imagine what this does if you're using a shell script to read a list of unknown file names containing unknown spaces.
lev@sys09:~$ read word1 word2; echo "$word1,$word2"
123 456... (2 Replies)
I obviously haven't learned my lesson with shell and whitespace.
find /path/to/some/where/ -name "*.pdf" | awk '{print $5}'| uniq -d
results:
some Corporation
other Corporate junk
firmx
Works fine from cmdline but the whitespace turns into another FS in a for loop.
for... (7 Replies)
Hi,
I have a for loop which iterates over a list of strings, separated by whitespace:
$ list="1 2 3"
$ for i in $list; do echo $i; done
1
2
3
I now want to introduce some strings containing whitespace themselves ... This is straightforward if I directly iterate over the list:
$ for... (4 Replies)
I want to create a temp file which is named based on a search string. The search string may contain spaces or characters that aren't supposed to be used in filenames so I want to strip those out.
My thought was to use 'tr' with but the result is the opposite of what I want:
$ echo "test... (5 Replies)
Hi
Following is an example line.
echo "192.22.22.22 \"33dffwef\" 200 300 dsdsd" | sed "s:\(\ *\ \):\1:"
I want it's output to be
200
However this is not the case. Can you tell me how to do it? I don't want to use AWK for this. Secondly, how can i fetch just 300? Should I use "\2"... (3 Replies)
Daily stupid question. I want to increment the file name everytime the script is run. So for example if the filename is manager.log and I run the script, I want the next sequence to be manager.log1. So to be clear I only want it to increment when the script is executed. So
./script... (10 Replies)
Having issues with an expect script. I've been scripting bash, python, etc... for a couple years now, but just started to try and use Expect. Trying to create a script that takes in some arguments, and then for now, just runs a pwd command(for testing, final will be command I pass).
Here is... (0 Replies)
I am trying to do in a single line to take a list of paths separated by whitespace and then loop thru all the paths that were wrote but my regex is not working,
I have
echo {3} | sed 's/ //g' | while read EACHFILE
do
.....
But for some reason is only taking always the first path that I... (7 Replies)
Create a single bash script that does the following:
a. Print out the number of occurrences for each motif that is found in the bacterial genome and output to a file called motif_count.txt
b. Create a fasta file for each motif (so 3 in total) which contains all of the genes and their... (6 Replies)
Discussion started by: dre
6 Replies
LEARN ABOUT DEBIAN
odfbuild
ODFBUILD(1p) User Contributed Perl Documentation ODFBUILD(1p)NAME
odfbuild - OpenDocument file creation utility
SYNOPSIS
odfbuild filename.odt
odfbuild filename.odt --title "My Document" --subject "Test"
odfbuild filename.ods --class spreadsheet --source "data.csv" --tablesize "8x16"
cat data.txt | odfbuild filename.odt -
OPTIONS --class Document class (text, spreadsheet, drawing, presentation)
Default: text
--opendocument (no value). If this option is on, the document will be in
OpenDocument format. Without this option, the format will
be selected according to the general configuration of the
OpenOffice::OODoc installation.
--creator The author of the document. Default: the current user's
login name.
--date Creation date. Default is current local time.
If provided, must be in ISO-8601 format
(YYYY-MM-DDTHH:MM:SS)
--description The description (abstract) of the document. Default: none.
--force (no value). If this option is on, any existing file with
the same path as the target file will be replaced. Without
this option, the program will fail if the target exists.
--generator Software signature to be stored in the file (not visible
for the end user).
Default: "Genicorp OpenOffice::OODoc <version>"
--keywords A list of comma-separated keywords. Default: none.
--source A text file, to be used as the content of the document.
If the document class is 'text', each line is loaded as a new
paragraph with the standard style. If the document class is
'spreadsheet', the file is processed as CSV data and loaded
in one sheet. If the document class is neither 'text' nor
'spreadsheet', the file is not processed.
If source = '-', or if a '-' argument is provided, the data
file is read through the standard input.
--subject The subject of the document. Default: none.
--tablename The name of the sheet to be created if the document class is
'spreadsheet' and if a data file is provided. Default: the name
of the data file, or "Unnamed Sheet" if the data is read from
the standard input.
--tablesize The size of the sheet to be created if the document class is
'spreadsheet' and if a data file is provided, in 'HxW' format
where H is the number of lines and W the number of columns.
Default: '16x8'
--title The title of the document. Default: "Untitled".
--readable_XML (no value). For debugging only. If this option is on, the XML
content of the target file is indented, in order to be later
edited.
perl v5.14.2 2008-05-07 ODFBUILD(1p)