Sponsored Content
Full Discussion: Parse Directory path - awk
Top Forums Shell Programming and Scripting Parse Directory path - awk Post 303039553 by RudiC on Wednesday 9th of October 2019 08:37:37 AM
Old 10-09-2019
Will the data follow a certain sequence, i.e. parent dirs sorted, parent dir before child dir, non-empty $3 before empty $3, non-empty $4 before empty $4?
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Parse value from multiple row to create the path

Hi all, Hope all the expert can help me in this situation. Let say I have one file with multiple record like below: NAME=FRAGMENT LANGUAGE=1 DIALECT=0 GENDER=NONE FILE=TEST1 DIRECTORY=D:/DETAILS/1/0/test1.txt END NAME=FRAGMENT LANGUAGE=1 DIALECT=0 GENDER=NONE (13 Replies)
Discussion started by: shirleyeow
13 Replies

2. UNIX for Dummies Questions & Answers

awk to parse a directory name?

Hi, I have a directory file name: /auto/space/user/jen/CED/CED_01MZ/visit1/DCE_2eco/016/echo1 I would like to just get the following outputs into variables such that: variable1 = /auto/space/user/jen/CED/CED_01MZ/visit1/ and variable2 = DCE_2eco/016/echo1 I've tried it with... (2 Replies)
Discussion started by: nixjennings
2 Replies

3. Shell Programming and Scripting

Retrieve directory path from full file path through sh

Hi, I have a file abcd.txt which has contents in the form of full path file names i.e. $home> vi abcd.txt /a/b/c/r1.txt /q/w/e/r2.txt /z/x/c/r3.txt Now I want to retrieve only the directory path name for each row i.e /a/b/c/ /q/w/e/ How to get the same through shell script?... (7 Replies)
Discussion started by: royzlife
7 Replies

4. Shell Programming and Scripting

sed/awk for extracting directory from file path

Hi, I have following path: set file_path = D:/forums/prac/somedir/new1/file1.txt or set file_path = E:/new/forums1/prac/somedir/new2/file2.txt I need to grep "somedir" from file path. In this case preceding directory "prac" remains same for both the paths, but directories preceding... (7 Replies)
Discussion started by: sarbjit
7 Replies

5. Shell Programming and Scripting

Parse file name out of UNC path

Hello, I searched the forums and didn't see a situation like this: I cannot figure out how to parse out just the file name from the full path. The path looks like this: \\foo\bar\filename.ext I don't think something like 'cut' will work so I tried to whip up a regex but couldn't get it... (12 Replies)
Discussion started by: bytesnoop
12 Replies

6. Shell Programming and Scripting

Parse output path to set variable

I am looking to parse a text file output and set variables based on what is cropped from the parsing. Below is my script I am looking to add this feature too. All it does is scan a certain area of users directories for anyone using up more than X amount of disk space. It then writes to the... (4 Replies)
Discussion started by: es760
4 Replies

7. Shell Programming and Scripting

Variable of Path directory is not parsing in awk

Hi All, i had to split one files into 10 equally. For that i have coded below awk. OUTPUT_FILE=/home/sit/path/Files/file_EXPORT.lst DIR_NM=`dirname ${OUTPUT_FILE}` awk -v CURR_DATE="$(date +'%d-%m-%Y-%H-%M')" -v pth=$DIR_NM '{print >> pth/"tgt_file_name"CURR_DATE"_"NR%10 }' ${OUTPUT_FILE} ... (7 Replies)
Discussion started by: looney
7 Replies

8. UNIX for Beginners Questions & Answers

Convert Relative path to Absolute path, without changing directory to the file location.

Hello, I am creating a file with all the source folders included in my git branch, when i grep for the used source, i found source included as relative path instead of absolute path, how can convert relative path to absolute path without changing directory to that folder and using readlink -f ? ... (4 Replies)
Discussion started by: Sekhar419
4 Replies

9. UNIX for Beginners Questions & Answers

What is the difference ../directory path and ./directory path in ksh?

What is the difference ../directory path and ./directory path in ksh? (1 Reply)
Discussion started by: TestKing
1 Replies
pdftops(1)						      General Commands Manual							pdftops(1)

NAME
pdftops - Portable Document Format (PDF) to PostScript converter (version 3.00) SYNOPSIS
pdftops [options] <PDF-file> [<PS-file>] DESCRIPTION
Pdftops converts Portable Document Format (PDF) files to PostScript so they can be printed. Pdftops reads the PDF file, PDF-file, and writes a PostScript file, PS-file. If PS-file is not specified, pdftops converts file.pdf to file.ps (or file.eps with the -eps option). If PS-file is '-', the PostScript is sent to stdout. OPTIONS
-f number Specifies the first page to print. -l number Specifies the last page to print. -level1 Generate Level 1 PostScript. The resulting PostScript files will be significantly larger (if they contain images), but will print on Level 1 printers. This also converts all images to black and white. No more than one of the PostScript level options (-level1, -level1sep, -level2, -level2sep, -level3, -level3Sep) may be given. -level1sep Generate Level 1 separable PostScript. All colors are converted to CMYK. Images are written with separate stream data for the four components. -level2 Generate Level 2 PostScript. Level 2 supports color images and image compression. This is the default setting. -level2sep Generate Level 2 separable PostScript. All colors are converted to CMYK. The PostScript separation convention operators are used to handle custom (spot) colors. -level3 Generate Level 3 PostScript. This enables all Level 2 features plus CID font embedding. -level3Sep Generate Level 3 separable PostScript. The separation handling is the same as for -level2Sep. -origpagesizes Generate a PostScript file with variable page sizes and orientations, taking for each page the size of the original page in the PDF file. The PostScript file contains "<</PageSize [WIDTH HEIGHT]>> setpagedevice" lines in each page header, so that the paper input tray gets correctly changed on the printer. This option should be used when pdftops is used as a print filter. Any specification of the page size via -paper, -paperw, or -paperh will get overridden as long as each page of the PDF file has a defined paper size. No more than one of the mode options (-origpagesizes, -eps, -form) may be given. -eps Generate an Encapsulated PostScript (EPS) file. An EPS file contains a single image, so if you use this option with a multi-page PDF file, you must use -f and -l to specify a single page. No more than one of the mode options (-origpagesizes, -eps, -form) may be given. -form Generate a PostScript form which can be imported by software that understands forms. A form contains a single page, so if you use this option with a multi-page PDF file, you must use -f and -l to specify a single page. The -level1 option cannot be used with -form. No more than one of the mode options (-origpagesizes, -eps, -form) may be given. -opi Generate OPI comments for all images and forms which have OPI information. (This option is only available if pdftops was compiled with OPI support.) -binary Write binary data in Level 1 PostScript. By default, pdftops writes hex-encoded data in Level 1 PostScript. Binary data is non- standard in Level 1 PostScript but reduces the file size and can be useful when Level 1 PostScript is required only for its restricted use of PostScript operators. -r number Set the resolution in DPI when pdftops rasterizes images with transparencies or, for Level 1 PostScript, when pdftops rasterizes images with color masks. By default, pdftops rasterizes images to 300 DPI. -noembt1 By default, any Type 1 fonts which are embedded in the PDF file are copied into the PostScript file. This option causes pdftops to substitute base fonts instead. Embedded fonts make PostScript files larger, but may be necessary for readable output. -noembtt By default, any TrueType fonts which are embedded in the PDF file are copied into the PostScript file. This option causes pdftops to substitute base fonts instead. Embedded fonts make PostScript files larger, but may be necessary for readable output. Also, some PostScript interpreters do not have TrueType rasterizers. -noembcidps By default, any CID PostScript fonts which are embedded in the PDF file are copied into the PostScript file. This option disables that embedding. No attempt is made to substitute for non-embedded CID PostScript fonts. -noembcidtt By default, any CID TrueType fonts which are embedded in the PDF file are copied into the PostScript file. This option disables that embedding. No attempt is made to substitute for non-embedded CID TrueType fonts. -passfonts By default, references to non-embedded 8-bit fonts in the PDF file are substituted with the closest "Helvetica", "Times-Roman", or "Courier" font. This option passes references to non-embedded fonts through to the PostScript file. -preload preload images and forms -paper size Set the paper size to one of "letter", "legal", "A4", or "A3". This can also be set to "match", which will set the paper size to match the size specified in the PDF file. -origpagesizes overrides this setting if the PDF file has defined page sizes. -paperw size Set the paper width, in points. -origpagesizes overrides this setting if the PDF file has defined page sizes. -paperh size Set the paper height, in points. -origpagesizes overrides this setting if the PDF file has defined page sizes. -nocrop By default, output is cropped to the CropBox specified in the PDF file. This option disables cropping. -expand Expand PDF pages smaller than the paper to fill the paper. By default, these pages are not scaled. -noshrink Don't scale PDF pages which are larger than the paper. By default, pages larger than the paper are shrunk to fit. -nocenter By default, PDF pages smaller than the paper (after any scaling) are centered on the paper. This option causes them to be aligned to the lower-left corner of the paper instead. -duplex Set the Duplex pagedevice entry in the PostScript file. This tells duplex-capable printers to enable duplexing. -opw password Specify the owner password for the PDF file. Providing this will bypass all security restrictions. -upw password Specify the user password for the PDF file. -q Don't print any messages or errors. -v Print copyright and version information. -h Print usage information. (-help and --help are equivalent.) EXIT CODES
The Xpdf tools use the following exit codes: 0 No error. 1 Error opening a PDF file. 2 Error opening an output file. 3 Error related to PDF permissions. 99 Other error. AUTHOR
The pdftops software and documentation are copyright 1996-2004 Glyph & Cog, LLC. SEE ALSO
pdffonts(1), pdfimages(1), pdfinfo(1), pdftocairo(1), pdftohtml(1), pdftoppm(1), pdftotext(1) 31 July 2009 pdftops(1)
All times are GMT -4. The time now is 08:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy