Given this is homework, I'll only hint. First, I think you are on the right track with these:
You want to find all regular files in the directory, print the filename to stdout, and display the first line. So your solution would be the combination of these two commands that you've experimented with that do just that.
The first command probably isn't listing the file name, and the second command isn't considering all files.
Hi All,
How can the head command be used to extract only a particular line.
By default head -n filename displays the first n lines. I want only the nth line.
I couldn't get it from forum search.
Thanks,
Sumesh (6 Replies)
Yes , I have to find a file in unix without using any find or where commands.Any pointers for the same would be very helpful as i am beginner in shell scritping and need a solution for the same.
Thanks in advance.
Regards
Jatin Jain (10 Replies)
Hi friends,I am new to unix and this is really a dummy question.but please help me out.
How to simulate head command without using head command???
also tail command too,also more command.
it is given as a homework to do....please tell me how to do (2 Replies)
Hi, I have the following problem. I have files with one column of data (let's say file1.dat, file2.dat...file6.dat), and I would like to record the first value of the column of each file into another file (let's name it fileall.dat), which would have the the six values, one in each column. I use to... (4 Replies)
i have lots of files in /law/prod and /law/dev, such as AP20PD, AP20WS, AP20.scr, AP20.rpt
if i am in /law DIR
find . -name AP20PD, found in /law/prod and /law/dev
i want to head -1 AP20PD from both location and >> /tmp/test.log
can i use find and head in one line ?
----------... (1 Reply)
Hi,
I need some advise on whether there is a better way of doing what I am currently planning to do. Perhaps I should be using arrays instead of re-directing output to files?
I need to use a tool/program named ADRCI provided by Oracle to remove trace files that it generates. Honestly it is... (1 Reply)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Write a script that allows the user to print the first n lines or the last n lines of every file in the... (18 Replies)
we have a file as below
AREA,COUNTRY,RANK
A,MX,1
A,MX,2
A,MX,5
A,MX,8
A,IN,7
A,IN,5
A,IN,21
B,CN,6
B,CN,2
B,CN,8
B,CN,0
we need the TOP 2 RANK records for the combination of Area, Country as below. i know head -2, which gives top 2 records from file but not sure it lists based on... (7 Replies)
Discussion started by: JSKOBS
7 Replies
LEARN ABOUT DEBIAN
cupstestppd
cupstestppd(1) Apple Inc. cupstestppd(1)NAME
cupstestppd - test conformance of ppd files
SYNOPSIS
cupstestppd [ -I category ] [ -R rootdir ] [ -W category ] [ -q ] [-r] [ -v[v] ] filename.ppd[.gz] [ ... filenameN.ppd[.gz] ]
cupstestppd [ -R rootdir ] [ -W category ] [ -q ] [-r] [ -v[v] ] -
DESCRIPTION
cupstestppd tests the conformance of PPD files to the Adobe PostScript Printer Description file format specification version 4.3. It can
also be used to list the supported options and available fonts in a PPD file. The results of testing and any other output are sent to the
standard output.
The first form of cupstestppd tests one or more PPD files on the command-line. The second form tests the PPD file provided on the standard
input.
OPTIONS
cupstestppd supports the following options:
-I filename
Ignores all PCFileName warnings.
-I filters
Ignores all filter errors.
-I profiles
Ignores all profile errors.
-R rootdir
Specifies an alternate root directory for the filter, pre-filter, and other support file checks.
-W constraints
Report all UIConstraint errors as warnings.
-W defaults
Except for size-related options, report all default option errors as warnings.
-W filters
Report all filter errors as warnings.
-W profiles
Report all profile errors as warnings.
-W sizes
Report all media size errors as warnings.
-W translations
Report all translation errors as warnings.
-W all
Report all of the previous errors as warnings.
-W none
Report all of the previous errors as errors.
-q
Specifies that no information should be displayed.
-r
Relaxes the PPD conformance requirements so that common whitespace, control character, and formatting problems are not treated as hard
errors.
-v
Specifies that detailed conformance testing results should be displayed rather than the concise PASS/FAIL/ERROR status.
-vv
Specifies that all information in the PPD file should be displayed in addition to the detailed conformance testing results.
The -q, -v, and -vv options are mutually exclusive.
EXIT STATUS
cupstestppd returns zero on success and non-zero on error. The error codes are as follows:
1
Bad command-line arguments or missing PPD filename.
2
Unable to open or read PPD file.
3
The PPD file contains format errors that cannot be skipped.
4
The PPD file does not conform to the Adobe PPD specification.
EXAMPLES
The following command will test all PPD files under the current directory and print the names of each file that does not conform:
find . -name *.ppd ! -exec cupstestppd -q '{}' ; -print
The next command tests all PPD files under the current directory and print detailed conformance testing results for the files that do not
conform:
find . -name *.ppd ! -exec cupstestppd -q '{}' ;
-exec cupstestppd -v '{}' ;
SEE ALSO lpadmin(8),
http://localhost:631/help
Adobe PostScript Printer Description File Format Specification, Version 4.3.
COPYRIGHT
Copyright 2007-2011 by Apple Inc.
19 November 2009 CUPS cupstestppd(1)