Sponsored Content
Full Discussion: System V printing filter
Top Forums Shell Programming and Scripting System V printing filter Post 303025466 by jgt on Friday 2nd of November 2018 06:36:50 PM
Old 11-02-2018
I think if you add the following code:
Code:
    :filter=/mydir/filter/myfilter

at line 9 of the printcap file.


Then create a /mydir/filter/myfilter script in sh/ksh
Code:
save="N"
while read line
do
     if [ "$save" = "N" ]
     then
         m=`echo $line|cut -c1-6`
         if [ "a$m" = "aManual" ]
        then
            save="Y"
       fi
   fi
if [ "$save" = "Y" ]
then
    echo "$line"
fi
done

This User Gave Thanks to jgt For This Post:
 

5 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

how to configure the lp system to filter files passed to it

I registered a printer hp123 on Sun Solaris Server. I think my printer is expecting a carriage return and linefeed combination at the end of each line (DOS standard), but unix files only have linefeeds at the end of each line. How can I configure the lp system to filter files passed to it?... (1 Reply)
Discussion started by: simt
1 Replies

2. AIX

printing system with the command lp -d

Hello.. Plz, Any one can help me ? when I execute a printing system with the command lp -d<name of printer>, no result with all printers. I have verified the three processes : qdaemon, lpd, writesrv (No problem). thank's (0 Replies)
Discussion started by: okbainf
0 Replies

3. Shell Programming and Scripting

">" used in system() is not printing into file

I have a problem with the following skript in awk. cat runde.txt |awk '{ if ($5==2) { dataname_v=$1 "_" $4 "_adjust.rad befehl1="gensurf seitenwand... (17 Replies)
Discussion started by: ergy1983
17 Replies

4. Solaris

Solaris printing system migration

Hello folks, I'm currently working on migration of printing system from one server to another (namely from Sol 9 to Sol 10). I would like ask if is possible to manage migration via simple copying /etc/printers.conf file and folder /etc/lp to the new server??? I'm not sure if printers... (2 Replies)
Discussion started by: brusell
2 Replies

5. Shell Programming and Scripting

Filter ONLY lines with non-printing charaters

I have a file contains data with non-printing characters. i have used cat -v filename to display whole data with non-printing characters also. However, i need lines with non-printing characters into seperate file. My file is huge and looks like i have to manully find lines using cat -v filename |... (3 Replies)
Discussion started by: JSKOBS
3 Replies
gnome-session-save(1)						   User Commands					     gnome-session-save(1)

NAME
gnome-session-save - saves or terminates the current GNOME session SYNOPSIS
gnome-session-save [--gui] [--kill] [--session-name=name] [--silent] [gnome-std-options] DESCRIPTION
gnome-session-save can be used from a GNOME session to save a snapshot of the currently running applications. This session will be later restored at your next GNOME startup session. OPTIONS
The following options are supported: --gui If specified, then any errors will be displayed in a dialog box. Otherwise, such messages are displayed to stderr. Note that this option has no affect any dialogs that the window manager might display. --kill Terminates the GNOME session. The session will not be saved if this option is provided, unless the user has configured their session to always save on logout. -s, --session-name=name Set name of session to save. --silent Avoids displaying any confirmation or dialogs, including ones that are displayed by the window manager (such as dialogs informing the user about any windows that cannot save session, or session logout confirmation when the --kill option is also used). gnome-std-options Standard options available for use with most GNOME applications. See gnome-std-options(5) for more information. EXAMPLES
Example 1: Saving the user's current session example% gnome-session-save Example 2: Terminating the user's current session example% gnome-session-save --kill EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/gnome-session-save The command-line executable for the application. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-session | +-----------------------------+-----------------------------+ |Interface stability |Volatile | +-----------------------------+-----------------------------+ SEE ALSO
gnome-session(1), metacity(1), attributes(5), gnome-std-options(5) NOTES
Written by Brian Cameron, Sun Microsystems Inc., 2003, 2006, 2007. SunOS 5.11 07 Nov 2007 gnome-session-save(1)
All times are GMT -4. The time now is 05:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy