Sponsored Content
Full Discussion: extensions- simple question
Top Forums Shell Programming and Scripting extensions- simple question Post 302487246 by cfajohnson on Tuesday 11th of January 2011 07:43:00 PM
Old 01-11-2011

Note that the expansion is not done when the assignment is made, only when the variable is expanded (and not quoted). See the output of:
Code:
echo "$Doc_"

In ksh93 and bash with extglob set, you can use:
Code:
Doc_="+(*.doc|*.odt)"

Better might be to use an array (bash and ksh93):
Code:
Doc_=( +(*.doc|*.odt) )
printf "%s\n" "${Doc_[@]}"

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Simple question?

I've been a Linux user for quite some time, started out with Red Hat and Mandrake, and just recently moved to Slackware linux.... my question is this: Is there a big difference between Linux and Unix? If so, what? I was just looking at Sun's Solaris 8 thats free for download on Intel... (5 Replies)
Discussion started by: Cuthbert
5 Replies

2. UNIX for Dummies Questions & Answers

Simple Question

Can anyone tell me if there is a way to remove the encryption from Data CDs by UNIX? Or does anyone know of a program that can remove the encryption? I would much appreciate it! Thanks, -Peaves (2 Replies)
Discussion started by: Peaves
2 Replies

3. UNIX for Dummies Questions & Answers

Hopefully simple question

When i type cd etc/shadow it says that file or directory doesnt exist? Is there a way to show this or am i typing something wrong? :confused: (6 Replies)
Discussion started by: Corrail
6 Replies

4. UNIX for Dummies Questions & Answers

Ok simple question for simple knowledge...

Ok what is BSD exactly? I know its a type of open source but what is it exactly? (1 Reply)
Discussion started by: Corrail
1 Replies

5. Shell Programming and Scripting

Simple question.

Is it possible to establish an IF statement inside a case statement in a shell file ? thx (2 Replies)
Discussion started by: TARFU
2 Replies

6. UNIX for Dummies Questions & Answers

simple if then fi question

i'm trying to make a script that prints the name of the script for any command line parameter, here is what i have, and get `]]' unexpected: what am i doing wrong? (3 Replies)
Discussion started by: tefflox
3 Replies

7. Programming

Simple C question... Hopefully it's simple

Hello. I'm a complete newbie to C programming. I have a C program that wasn't written by me where I need to write some wrappers around it to automate and make it easier for a client to use. The problem is that the program accepts standard input to control the program... I'm hoping to find a simple... (6 Replies)
Discussion started by: Xeed
6 Replies

8. UNIX for Dummies Questions & Answers

A Simple Question

Hi All, I am new to Unix , I have entered 'cd w' in command prompt and pressed tab key , A tab space is generated instead of listing the folders or files that starts with 'W' . What should i do to get it working:confused: Thanks, Deepak (2 Replies)
Discussion started by: Deepakkumard
2 Replies

9. UNIX for Dummies Questions & Answers

simple(?) if/else question

Hello, I have a quick question that is not related to homework in any way shape or form (in case anyone wanted to know). My question is thus: I have a file "temp" that has the two values say "5" and "3" (separated by a white space). Now, I want to simply write an if-else statement that reads... (10 Replies)
Discussion started by: astropi
10 Replies

10. Red Hat

Syslog.conf: looking for a simple answer on a simple question

Cheers! In /etc/syslog.conf, if an error type is not specified, is it logged anywhere (most preferable is it logged to /var/log/messages) or not? To be more precise I am interested in error and critical level messages. At default these errors are not specified in syslog.conf, and I need to... (6 Replies)
Discussion started by: dr1zzt3r
6 Replies
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)
All times are GMT -4. The time now is 05:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy