Sponsored Content
Full Discussion: File extensions in a dir
Top Forums Shell Programming and Scripting File extensions in a dir Post 302368817 by jgt on Thursday 5th of November 2009 05:46:55 PM
Old 11-05-2009
I was going to say "find ./ -name *.doc -print" but on second reading, do you want a list of all the unique extensions?

Last edited by jgt; 11-05-2009 at 07:00 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

File name extensions

Hello people, I was wondering if anyone could help me? I want to produce a shell script that changes the filename extension on all matching file. E.G. change all files called ‘something.rtf' to ‘something.doc' by giving the command: Changex rtf doc *where ‘Changex' is the name of... (2 Replies)
Discussion started by: thurrock
2 Replies

2. Shell Programming and Scripting

copying a file from one dir to another dir

hi i have a script compareFiles() { find /tmp/Satya -type f | \ while read filename1 do echo "----------------------------------------$filename1" find /tmp/Satya -type f | \ while read filename2 do if diff $filename1 $filename2 then echo "Both files... (3 Replies)
Discussion started by: Satyak
3 Replies

3. Shell Programming and Scripting

Moving file(s) from dir to dir

Hi, I am fairly new to writing scripts. I am trying to write a script that moves either One or All of the files from one directory to another. I know how to make the actual command to do it, but i don't quite know how to add operators to it, ie -i or -a. I want -i to move one file from... (4 Replies)
Discussion started by: SirJoeh
4 Replies

4. UNIX for Dummies Questions & Answers

Copying dir (and sub dir) file names from ftp server to txt file in diff server

Hey all, i want to copy only the file names from an ftp server (directory and all sub directory) to a text file in another server (non ftp), i.e. i want to recursively move through directories and copy only the names to a text file. any help is appreciated...thank you in advance (1 Reply)
Discussion started by: deking
1 Replies

5. UNIX for Dummies Questions & Answers

How to list all files in dir and sub-dir's recursively along with file size?

I am very new to unix as well as shell scripting. I have to write a script for the following requirement. In have to list all the files in directory and its sub directories along with file path and size of the file Please help me in this regard and many thanks in advance. (3 Replies)
Discussion started by: nmakkena
3 Replies

6. Shell Programming and Scripting

Checking file extensions

I am trying to store file with certain file extensions to list but having some problems. Here is a part of the code set fryLst = "" set fxtLst = "" foreach f ($AfullNameLst) set fname = $f:r set fext = $f:e if ("$fext" == ".ry") set fryLst = "$fryLst $f" if ("$fext" == ".xt")... (2 Replies)
Discussion started by: kristinu
2 Replies

7. Shell Programming and Scripting

Checking file extensions

I'm in csh and have a list of file names, example set Lst = "file1.ry file2.ry file3.ry file4.ry" I want to check if all the extensions are ry. Is they are, I want to do something. (1 Reply)
Discussion started by: kristinu
1 Replies

8. UNIX for Dummies Questions & Answers

HELP, Need to capitalize all files in dir without capitalizing extensions

Hello everyone, I may sound stupid for asking this but I have files that need to be loaded onto every system at work. When loaded the files are for example.... 5peasw.sim the end result needs to be 5PEASW.sim this is for over 50 files in the directory they go to. I am trying to... (5 Replies)
Discussion started by: E404UserNotFoun
5 Replies

9. Shell Programming and Scripting

Create file Dir and Sub Dir same time

Hi Guys , I want create files Dire and Sub Dire. as same time using variable. EX: x1="/hk/Pt/put/NC/R1.txt" x2="/hk/pt/Put/Ot/NC/RN.txt" And i want delete all after done with my script. Thanks (2 Replies)
Discussion started by: pareshkp
2 Replies

10. Shell Programming and Scripting

Remove comments from file with specific file name extensions

Hello Unix board community, I have to program a shell script, but I am a complete noob so I hope I get some help here. The assignment is as follows: The program removes all comments regardless of formatting or language from files with specific file name extensions (php, css, js, ...).... (3 Replies)
Discussion started by: TheZeusMan
3 Replies
XpSetContext(3Xp)						 XPRINT FUNCTIONS						 XpSetContext(3Xp)

NAME
XpSetContext - Sets or unsets a print context with the specified display connection to the X Print Server. SYNOPSIS
cc [ flag... ] file... -lXp [ library... ] #include <X11/extensions/Print.h> void XpSetContext ( display, print_context ) Display *display; XPContext print_context; ARGUMENTS
display Specifies a pointer to the Display structure; returned from XOpenDisplay. print_context A pre-existing print context on the same X Server. DESCRIPTION
XpSetContext sets the print context for a display connection. All subsequent print operations that do not explicitly take a print context- id (for example, XpStartJob) on display will use and act upon the print context set by this call, until the print context is unset or XpDe- stroyContext is called. The print context can be set and used on multiple jobs, if not destroyed. If print_context is None, XpSetContext will unset (disassociate) the print context previously associated with display. If there was no pre- viously associated print context, no action is taken. The content of the formerly associated print context is not affected by this call, and other display connections may continue to use the print context. Since font capabilities can vary from printer to printer, XpSetContext may modify the list of available fonts (see XListFonts) on display, and the actual set of usable fonts (see XLoadFont). A unique combination of fonts may be available from within a given print context; a client should not assume that all the fonts available when no print context is set will be available when a print context is set. When a print context is set on a display connection, the default behavior of ListFonts and ListFontsWithInfo is to list all of the fonts normally associated with the X print server (i.e. fonts containing glyphs) as well as any internal printer fonts defined for the printer. The xp-listfonts-modes attribute is provided so that applications can control the behavior of ListFonts and ListFontsWithInfo and is typi- cally used to show just internal printer fonts. Using only internal printer fonts is useful for performance reasons; the glyphs associated with the font are contained within the printer and do not have to be downloaded. If the value of xp-listfonts-modes includes xp-list-glyph-fonts, ListFonts and ListFontsWithInfo will include all of the fonts available to the server that have glyphs associated with them. If the value of xp-listfonts-modes includes xp-list-internal-printer-fonts, then List- Fonts and ListFontsWithInfo will include all of the fonts defined as internal printer fonts. When the print context is unset or XpDestroyContext is called, the available fonts on display revert back to what they were previously. DIAGNOSTICS
XPBadContext A valid print context-id has not been set prior to making this call. SEE ALSO
XpDestroyContext(3Xp), XpStartJob(3Xp) X Version 11 libXp 1.0.0 XpSetContext(3Xp)
All times are GMT -4. The time now is 01:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy