I'm trying to clean up my samba share and need to print the found file or print the path of the image it tried to searched for. So far I have this but can't seem to get the logic right. Can anyone help point me in the right direction?
Last edited by zaxxon; 10-09-2009 at 01:51 AM..
Reason: code tags and indention
#!/bin/ksh
for files in `ls *.gz`
do
gunzip -c $files | awk -v s=$files -F\" '{print s","$6}'
done
I have tried FILENAME parameter but it did not work please help. (1 Reply)
using OS X and the Terminal, I'd like to find all locked files in a specified directory, unlock them, and print a list of those files that were unlocked
how can I do this?
I'm familiar with chflags nouchg for unlocking one file but not familiar with unix enough to do what I'd like.
Thanks! (0 Replies)
cat a | awk -F";" '{print "update db set column=' "$2" ' where column1=\""$1"\";"}' > ip-add.sql
Hi! I'm a new user!
i need to use single quote in the double quotes print string
The apex between che "$2" should not be interpreted, but....how?!
I'm trying to use \ but don't work correctly!
... (4 Replies)
Hi, I am new to this unix world.
Any ways, I would like to write a shell script that can print the file name.
Ex :
directory will have 5 files with different name.No matter what are contents are.
Now I need to find the file which will have particular name (sub string ).Please do not... (5 Replies)
I can got the filename with this script. it's only show "-" in result.
cut -d , -f7 CSV_d.* | awk 'OFS=":"{print FILENAME,substr($1,1,8),substr($1,9,2),substr($1,11,2),substr($1,13,2)}' | sort |uniq (2 Replies)
hi,
i have a directory at /path/unix with the following files
1.txt
2.txt
3.txt
4.txt
I want to make another file called filenames.txt at a different location called /path/home. So, my output file would be
/path/home/filenames.txt with contents
/path/unix/1.txt... (1 Reply)
I have files named with different prefixes. From each I want to extract the first line containing a specific string, and then print that line along with the prefix.
I've tried to do this with a while loop, but instead of printing the prefix I print the first line of the file twice.
Files:... (3 Replies)
Hi
I have a requirement like this:
/abc/a/x.txt
/abc/a/y.txt
/abc/b/x.gz
/abc/b/y.txt
I need output like this:
/abc/a:*.txt
/abc/b:*.txt
/abc/b:*.gz
I have tried find /abc -type f -name "*.*" ||awk -F . '{print $NF}' it is print only extensions without path name.
Please... (5 Replies)
The file f1 contains the text "body" (shell prompt is "$"):
$ cat ~/path/f1
body
How to print contents of f1 when the f1 path is in a variable?
Here is my failed attempt:
$ f1="~/path/f1"
$ echo $f1
~/path/f1
$ cat $f1
cat: '~/path/f1': No such file or directory (2 Replies)
Discussion started by: wolfv
2 Replies
LEARN ABOUT REDHAT
xmprintsetup
XmPrintSetup(library call) XmPrintSetup(library call)
NAME
XmPrintSetup -- setup and create a Print Shell widget
SYNOPSIS
#include <Xm/Print.h>
Widget XmPrintSetup(
Widget video_widget,
Screen *print_screen,
String print_shell_name,
ArgList args,
Cardinal num_args);
DESCRIPTION
A function that does the appropriate setting and creates a realized XmPrintShell that it returns to the caller. This function hides the
details of the Xt to set up a valid print shell heirarchy for the application. It is also meant to encourage consistency in the way appli-
cations root their print widget hierarchy.
print_screen must belong to a Display connection that has already been initialized with Xt.
The video_widget is used to get at the application context, application name and class, and argc/argv stored on the applicationShell that
roots this widget. If no applicationShell is found, NULL argv/argc are used.
XmPrintSetup then creates an unrealized ApplicationShell with the same name and class as the one given by the video display, on the print
display and on the print screen specified.
An XmPrintShell is then created as a child of this toplevel shell, using XtCreatePopupShell, with the name print_shell_name, and using the
args provided. It then realizes and maps the print shell, using XtPopup with XtGrabNone.
This way, application resource files and users can specify print specific attributes using the following syntax (if print_shell_name is
"Print"):
Dtpad.Print*textFontList: somefont
*Print*background:white
*Print*highlightThickness:0
video_widget
A video widget to fetch app video data from.
print_screen
A print screen on the print display - specifies the screen onto which the new shell is created.
print_shell_name
Specifies the name of the XmPrintShell created on the X Print server.
args Specifies the argument list from which to get the resources for the XmPrintShell.
num_args Specifies the number of arguments in the argument list.
RETURN VALUE
The id the XmPrintShell widget created on the X Print Server connection, or NULL if an error has occured.
ERRORS /WARNINGS
None.
EXAMPLES
From the OK callback and the SetUp callback of the primary print dialog widget:
static void
printOKCB(Widget, XtPointer call_data, XtPointer client_data)
{
AppPrint *p = (AppPrint *) client_data;
DtPrintSetupCallbackStruct *pbs =
(XmPrintCallbackStruct *) call_data;
/* connect if not already done.
the print dialog callback always provides valid
printer name, print display and screen
already initialized: XpInitContext called */
*/
p->print_shell = XmPrintSetup (widget, pbs->print_screen,
"Print", NULL, 0);
...
}
SEE ALSO XmPrintShell(3), XmRedisplayWidget(3), XmPrintToFile(3), XmPrintPopupPDM(3)
XmPrintSetup(library call)