I would like to create a table in a shell script who contain images in ASCII arts without using a text file.
For information, the shell script create an rst file which itself create a pdf and html file.
thank
Maybe something like this:
myArt='
/_o_\
|
/ \
'
echo "$myArt"
enter image description here
I would like create this table whithout using text file
from shell script
Related
I have a task which passes highlighted text (${selectedText}) to an external script and the output gets printed in the terminal.
Is there anyway to have that script output replace the highlighted text?
:)
Even saving to a new file and merging into the existing file would be fine, that seems far more complicated though.
I found I can do this in a slightly more round about way than I intended. VSCode Tasks can be shell operations, so I solved the problem using bash shell tools like sed and awk.
1.) Have the output of my script get saved to a temporary file.
2.) Using sed -i I can strategically erase the highlighted lines (after determining the range of lines highlighted).
3.) Then using AWK I can paste the temp file output into specific lines in my primary file. I could do it all in sed or awk but found it easier to use both.
4.) Clean up by deleting the temp file.
So there is no all in one nice VSCode solution that I could find, but it is doable.
I am trying to query a Sybase ASA database using the dbisqlc.exe command-line on a Windows system and would like to collect the column headers along with the associated table data.
Example:
dbisqlc.exe -nogui -c "ENG=myDB;DBN=dbName;UID=dba;PWD=mypwd;CommLinks=tcpip{PORT=12345}" select * from myTable; OUTPUT TO C:\OutputFile.txt
I would prefer it if this command wrote to stdout however that does not appear to be an option aside from using dbisql.exe which is not available in the environment I am in.
When I run it in this format the header and data is generated however in an unparsable format.
Any assistance would be greatly appreciated.
Try adding the 'FORMAT SQL' clause to the OUTPUT statement. It will give you the select statement containing the column names as well as the data.
In reviewing the output from the following dbisqlc.exe command, it appears as though I can parse the output using perl.
Command:
dbisqlc.exe -nogui -c "ENG=myDB;DBN=dbName;UID=dba;PWD=mypwd;CommLinks=tcpip{PORT=12345}" select * from myTable; OUTPUT TO C:\OutputFile.txt
The output appears to break in odd places using text editors such as vi or TextPad however the output from this command is actually returned with specific column widths.
The second line of the output includes a set of ='s signs which are contained for the width of each column. What I did was build a "template" string based on the ='s which can be passed to perls unpack function. I then use this template to build an array of column names and parse the result set using unpack.
This may not be the most efficient method however I think it should give me the results I am looking for.
I have a list of 800 words in an .rtf file in this format:
word1
word2
.
.
word799
word800
Is there any way I can create a plist of Strings out of this? I really do not want to add each word one at a time.
Thanks A Lot!
What I would do is copy and paste the list of words into a straight up text file. Then you can write a command line script in the language of your choice (I'd choose Python, for example) that will read in this text file and invoke the defaults utility from the command line to write your values. You can use the defaults utility like:
$ defaults write $PLIST_FILE $PROPERTY_NAME $VALUE # sets
I have got an image file which has 3 colors as background. I have also got a text file . I need to write a Perl script which copies text file on to the specific background color of the image file.
When I execute my Perl script , the script should ask the path for image file and then the path for text file.
This sounds like a job for ImageMagick, this page has some examples that should help you get started.
I use GD for this sort of work. Image::Magick will also do the trick.
Please help me to achieve the below problem:
I am having one "view" in the Oracle database,I want the output of that view and store that output in the .txt file on some other folder in UNIX box.
The output which is generated from view is a report and I want to save that report in .txt format in one folder on UNIX box.Oracle is present on the UNIX box.
I thought you might be able to use data pump, but maybe the easiest way is to just run this into the standard oracle sql command line app like:
set long 10000
set termout off
set trimspool off
set feedback off
set heading off
spool test.txt
select a ||','||b||','||c from myview;
spool off;
If you put this in a file called extractSql.sql, then you could run:
${ORACLE_HOME}/bin/sqlplus -L ${USER}/${PASS}#${DB_SERVER} #extractSql.sql