MyFile contains:
I need to cat the file and have it substitute all of the variables with their contents. cat MyFile does not work. The following works for the first line, but errors on the second line because of the paren:
Any suggestions?
No, I cannot remove the parens as they are part of the SQL syntax.
Last edited by Franklin52; 11-03-2011 at 04:06 AM..
Reason: Please use code tags, thank you
Hey All,
I'm trying to clean up a variable using sed but It dosn't seem to work. I'm trying to find all the spaces and replace them with "\ " (a slash and a space). For Example "Hello World" should become "Hello\ World". But it does nothing. If I put it directly into the command line it works... (3 Replies)
Hi,
does anybody knows about wc -l, how to transform it inot a just number?
this script ALWAYS executes the command3!!, However, the value of BMU_RUNNING is 1
case $BMU_RUNNING in
*0) command1
;;
*1) command 2;;
*)command 3;;
esac
The... (3 Replies)
I have a question to do and it's somewhat confusing. It says, and I quote
"Create a file called file_1 with three lines of text in it. Create a shell variable called "f_name", assign it the string "file_1". Use the cat command and the variable "f_name" to display the contents of the file... (3 Replies)
Hello,
i have another sed question.. I'm trying to do variable substition with sed and i'm running into a problem.
my var1 is a string constructed like this:
filename1 filerev1 filepath1
my var2 is another string constructed like this:
filename2 filerev2 filepath2
when i do... (2 Replies)
I have a file with a single filename in it, which I want to assign to a BASH variable, so I've been trying:
c=$(head -1 somefile)
echo $c
which outputs correctly, but them when I do
...
somecommand $c
it says it can't find the file, is that because it's grabbing the whole line, and... (5 Replies)
Hi ,
I have a variable as follows,
Temp=`cat ABC.txt | cut -c5-`
This will yeild a part of the date. say , 200912.
I would like to substitute this variable's value in a filename.
eg: File200912F.zip
when i say File$TempF.zip , it is not substituting.
Any help ?
Thanks in... (2 Replies)
For example I have variable like below
echo $OUTPUT
/some/path/`uname -n`
when I try to use the variable OUTPUT like below
cd $OUTPUT or cd ${OUTPUT}
I am getting bad substituion error message
$ cd $OUTPUT
ksh: cd: bad substitution
$ cd ${OUTPUT}
ksh: cd: bad substitution
... (1 Reply)
I have a huge script which is defining variables with full path of commands in the beginning of code and using those variables in the script.
For Example:
ECHO=/bin/echo
LS=/bin/ls
SED=/bin/sed
AWK=/bin/awk
UNAME=/bin/uname
PS=/bin/ps
DATE=/bin/date
GREP=/bin/grep
$ECHO "hello... (1 Reply)
I am trying to cat on a file located on remote server and assign it to remote variable.
I have both local and remote variables. Running below script from local. test.sh
J_NAME=XXX2
J_IP=XXX
ssh $J_IP "ps auxw |grep java | grep -v grep |grep $J_NAME | awk '{print ... (2 Replies)
Thank you in advance for looking at this, I've scoured the internet and can't find the answer I'm looking for!! - I am new at bash script so please bare with me!!
I have a script where I've identified individual files within a folder, the filename is then stored as a variable ($filename):... (3 Replies)
Discussion started by: paperbackwriter
3 Replies
LEARN ABOUT SUSE
pom2
POM2(1) User Contributed Perl Documentation POM2(1)NAME
pom2 - convert POD to Text, HTML, etc., with Pod::POM
SYNOPSIS
pom2 text MyFile.pm > MyFile.txt
pom2 html MyFile.pm > MyFile.html
pom2 pod MyFile.pm > Myfile.pod
pom2 format [options] MyFile.pm > Myfile.xyz
DESCRIPTION
This script uses "Pod::POM" to convert a Pod document into text, HTML, back into Pod (e.g. to normalise a document to fix any markup
errors), or any other format for which you have a view module.
If the viewer is not one of the viewers bundled with "Pod::POM", the script searches for an installed "Pod::POM::View" module that matches
the specified format. For example if you have "Pod::POM::View::DocBook" installed then you could say:
pod2 docbook MyFile.pm > MyFile.xml
If any options other than "--help" are specified then they are passed to the constructor method of the view class. For example:
pod2 docbook --root=chapter --titlecasing MyFile.pm > MyFile.xml
would convert the Pod document to a DocBook chapter document with the titlecasing option enabled. Note that any string prefixed by ""--""
is taken as a valid option and passed to the constructor; if no value is specified then a value of 1 is passed in.
AUTHOR
Andy Wardley <abw@kfs.org>
extended by Andrew Ford <A.Ford@ford-mason.co.uk>
VERSION
This is version 0.3 of pom2.
COPYRIGHT
Copyright (C) 2000, 2001 Andy Wardley. All Rights Reserved.
Copyright (C) 2009 Andrew Ford. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
For further information please see Pod::POM.
perl v5.12.1 2009-03-19 POM2(1)