I used tbl command to format the data in a tabular format and it worked fine for a file which contain 71 lines and when I added another line in the file it break with below error -
error: page 2: table will not fit on one page; use .TS H/.TH with a supporting macro package
then I looked at the man page and found the same info. and tried all possible combination of use .TS and .TE in input file. Please share your solution if you have came across this kind of problem.
snapshot of command that I am using -
cat file.txt
.TS
tab(:)
ce|ce|ce|ce|ce|ce
row1-col1:col2:col3:col4:col5:col6
row2-cola:colb:colc:cold:cole:colf
.......
.......
row72-cola:colb:colc:cold:cole:colf
.TE
Passing this file to tbl command like below -
tbl file.txt|groff -T ascii
Is there a way to use .TS, .TH and '.TE` to process more than 71 lines?
Here is the solution to print the output in tabular format using tbl for multi page -
.TS H
tab(:)
ce|ce|ce|ce|ce|ce
.TH
row1-col1:col2:col3:col4:col5:col6
row2-cola:colb:colc:cold:cole:colf
.......
.......
row72-cola:colb:colc:cold:cole:colf
.TE
And need to use this file like below -
tbl file.txt|groff -ms -T ascii
Related
I'm trying to use the update_info command in order to add some bookmarks to an existing pdf's metadata using pdftk and powershell.
I first dump the metadata into a file as follows:
pdftk .\test.pdf dump_data > test.info
Then, I edit the test.info file by adding the bookmarks, I believe I am using the right syntax. I save the test.info file and attempt to write the metadata to a new pdf file using update_info:
pdftk test.pdf update_info test.info output out.pdf
Unfortunately, I get a warning as follows:
pdftk Warning: unexpected case 1 in LoadDataFile(); continuing
out.pdf is generated, but contains no bookmarks. Just to be sure it is not a syntax problem, I also ran it without editing the metadata file, by simply overwriting the same metadata. I still got the same warning.
Why is this warning occurring? Why are no bookmarks getting written to my resulting pdf?
using redirection in that fashion
pdftk .\test.pdf dump_data > test.info
will cause this known problem by building wrong file structure, so change to
pdftk .\test.pdf dump_data output test.info
In addition check your alterations are correctly balanced (and no unusual characters) then save the edited output file in the same encoding.
Note:- you may need to consider
Use dump_data_utf8 and update_info_utf8 in order to properly display characters in scripts other than Latin (e. g. oriental CJK)
I used pdftk --help >pdftk-help.txt to find the answer.
With credit to the previous answer, the following creates a text file of the information parameters: pdftk aaa.pdf dump_data output info.txt
Edit the info.txt file as needed.
The pdftk update_info option creates a new pdf file, leaving the original pdf untouched. Use: pdftk aaa.pdf update_info info.txt output bbb.pdf
I can't seem to find a way to specify a relative path for my infile when using sql loader.
I'm running it through a command line and this is what it looks like:
C:\app\...in\sqlldr.exe userid=user/pass
control="C:\User...DATA_DATA_TABLE.ctl" log="C:\User...DATA_DATA_TABLE.log"
bad = "C:\User...DATA_DATA_TABLE.bad" discard = "C:\User...DATA_DATA_TABLE.dsc"
(I've added carriage returns just for the readability on here, the command i use is one line)
And this works, it's will start inserting stuff in the table IF the path to my infile in .ctl is absolute like "C:\Usertemp\example.ldr"
My ctl was generated autmatically by sqldeveloper. And i just changed the path to this:
OPTIONS (ERRORS=50)
LOAD DATA
INFILE 'AI_SLA_DATA_DATA_TABLE.ldr' "str '{EOL}'" <-- i'm trying to get relative path here but doesn't work
APPEND
CONTINUEIF NEXT(1:1) = '#'
INTO TABLE "USER"."DATA"
...other sqldeveloper generated stuff
The .ldr file is in the same directory as the .ctl file. Is it possible to get the path of the ctl? I'm pretty sure he searches for the .ldr file next to the sqlldr.exe instead of the ctl.
Any tips to do this? I can't find answers on docs.oracle.
Thanks.
I've never tried adding a relative path to the .ctl file, but for me it works fine as a command-line argument, e.g.
C:\app\...in\sqlldr.exe userid=user/pass
control="DATA_DATA_TABLE.ctl" log="DATA_DATA_TABLE.log"
bad = "DATA_DATA_TABLE.bad" discard ="DATA_DATA_TABLE.dsc"
data="AI_SLA_DATA_DATA_TABLE.ldr"
In windows 10, I followed the step-by-step MXnet tutorial to use im2rec.py to create a dataset. I created a image list file like this:
integer_image_index \t label_index \t path_to_image
Next, I modified .txt to .lst.
Finally, I executed the command:
python im2rec.py --exts '.jpg' --train-ratio 0.41 --test-ratio 0.49 --recursive=True --pack-label=True D:\CUB_200_2011\data\image_label.lst D:\CUB_200_2011\CUB_200_2011\image
It is shown that "read no error", but the files created by the command like .lst and .rec are 0K, there is empty. I don't know why.
Please tell me what mistakes I made.
im2rec.py will print
read none error:(filename)
for any file that it can't load for whatever reason. Maybe some of the files you list aren't there or are empty? Or maybe the base path you've specified is wrong -- I notice you have the folder name CUB_200_2011 twice.
On OSX, how can I extract a sequence of pages from a PDF into a single file using the command line? I see that there are commands to split a PDF into separate pages... but I'd like to specify a page range (e.g. pages 24-31) and output a single PDF file.
With the pdfbox command line utilities of the pdfbox-app jar file:
http://pdfbox.apache.org/download.cgi
http://pdfbox.apache.org/2.0/commandline.html
java -jar pdfbox-app-x.y.z.jar PDFSplit -startPage 24 -endPage 31 yourfile.pdf
A result file named yourfile-1.pdf will be created.
I already know batch renaming is possible via Powershell, but so far I didn't find an answer that solves my problem:
I have a staple of pdfs named with an ID:
Eg.
332906.pdf
331339.pdf
343807.pdf
...
I produced a simple CSV out of my spreadsheet which contains the id in the first column and the corresponding filename i want in the second one:
appid;Fullname with I.D.
332906;Mike Miller_332906;
331339;Tom Hanks_331339;
343807;Scarlett Jo_343807;
....
....
I have to do that on my office computer so I can't download additional programms or use programming lanugages, all I have is the cmd box and Powershell.
Can I do that?
Thank you for your help!
Edit: Spreadsheet changed to CSV; CSV Example added
You may have a problem with the column heading as-is, but if you change it to below:
appid,Fullname_ID
332906,Mike Miller_332906,
331339,Tom Hanks_331339,
343807,Scarlett Jo_343807,
You can run this simple script to do the file rename:
$c = import-csv .\path\to.csv
$c | % { mv "$($_.appid).pdf" "$($_.Fullname_ID).pdf" }
What this does is create a PowerShell object containing the data from the csv file.
$c | % { .. } means iterate over all the rows in the csv and run the code in the blocks {...}
$_ represents each row, and from that you can access the columns using .appid and .Fullname_ID. The move (mv) command is what you will use to do the rename.