04-11-2008
Can't pass filename to dtpad editor
I posted this in the Advanced forum, thought I'd try it here as well...
At the command line, If I type:
%dtpad filename &
It just opens up a blank dtpad window (and no error is returned), just as if I typed:
%dtpad &
And no difference if I give it the pathname, such as:
%dtpad /here/there/filename &
No issues with passing a filename using vi, xedit, emacs, etc...
The SA indicated it's simply how dtpad runs on our AIX box,
but not being able to pass a file to an editor just doesn't make any sense.
Also, when dtpad opens, I can open a file going the gui File->Open route, but it's way too slow and cumbersome. Interestingly, when I go this route the files that come up for me to select are never in the directory where I actually kicked off dtpad:
So if I'm in /here/there, and open a dtpad window, the File->Open route points me to /nothere/notthere...I'm thinking there's a connection between this and not being able to pass a file on the command line, but don't have the expertise to diagnose...
Regards,
Eryck
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How can I use the value of an argument as a filename? Example:
The argument for a process is 999. I would like the output of the process to be placed in a file called 999. I have tried using $$1, but that only assigns a unigue number.
thanks
JP (1 Reply)
Discussion started by: jpprial
1 Replies
2. UNIX for Dummies Questions & Answers
try{ng to find an easy to use text editor for the novice user (vi is too complicated, and pico may be a second choice). the issue I'm having is when the user(in dtpad) copies from another platform (e.g. IBM - MVS, windows), special characters show up such as carriage returns, etc. I know this... (2 Replies)
Discussion started by: douknownam
2 Replies
3. UNIX for Advanced & Expert Users
At the command line, If I type:
%dtpad filename &
It opens up a blank dtpad window, just as if I typed:
%dtpad &
And no difference if I give it the pathname, such as:
%dtpad /here/there/filename &
No issues with passing a filename using vi, xedit, emacs, etc...
The SA indicated... (1 Reply)
Discussion started by: edhamilt
1 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I knw its a silly question, but am a newbie to 'vi' editor. I'm forced to use this, hence kindly help me with this question.
How can i paste a chunk 'copied from' a different editor(gedit) in 'vi editor'?
As i see, p & P options does work only within 'vi'. (10 Replies)
Discussion started by: harishmitty
10 Replies
5. Shell Programming and Scripting
Hi All,
I am running a script , working very fine on cmd prompt. The problem is that when I open do crontab -e even after setting editor to vi by
set EDITOR=vi it does not open a vi editor , rather it do as below.....
/////////////////////////////////////////////////////
$ set... (6 Replies)
Discussion started by: aarora_98
6 Replies
6. Shell Programming and Scripting
Hi all,
I have a list of xml file. I need to split the files to a different files when see the <ko> tag.
The list of filename are
B20090908.1100-20090908.1200_CDMA=1,NO=2,SITE=3.xml
B20090908.1200-20090908.1300_CDMA=1,NO=2,SITE=3.xml
B20090908.1300-20090908.1400_CDMA=1,NO=2,SITE=3.xml
... (3 Replies)
Discussion started by: natalie23
3 Replies
7. Shell Programming and Scripting
Hi,I have a script which is given below :#!/bin/bash. ini_script.shdb2 connect to $DB_NAME user $DB2_UID using $DB2_PASSWORDfor file in `ls -1 ./sql/ddw/`do echo "Executing the file $file" echo db2 -tvf $filedonedb2 quiti want this script to accept directorie's names present in... (1 Reply)
Discussion started by: ektubbe
1 Replies
8. Shell Programming and Scripting
I have written a script which works fine, to remove patterns contained in EXCLUDE.DAT from input.txt
awk 'BEGIN {n=0;while (getline < "EXCLUDE.DAT" > 0){ex=$0;n++}} {for(var in ex){print var "-" ex $0 ;i++}}' input.txt
The last problem I need to solve is how to pass the file... (3 Replies)
Discussion started by: nixie
3 Replies
9. Shell Programming and Scripting
Hi,
I am facing one issue. The awk command works fine if i hardcode the file name but if is pass it as an arguement it doesn't work. For e.g:Below commands works fine
awk -v A="$type" '{F=substr($0,23,8) "_LTD_" A ".txt"; print $0 >> F; close(F) }' RL004.txt
But the below command does not... (2 Replies)
Discussion started by: Neelkanth
2 Replies
10. Shell Programming and Scripting
Hi Experts,
how to pass subject,mailbody and filename as parameters to function.
mode=$1
file=/db/files/uniq.txt
mail_send() {
export MAILPART=$(uuidgen)
export MAILPART_BODY=$(uuidgen)
{
echo "TO:nalu.d@hes.com"
echo "Subject:$subject"
echo "MIME-Version: 1.0"
... (0 Replies)
Discussion started by: nalu
0 Replies
LEARN ABOUT REDHAT
xmredisplaywidget
XmRedisplayWidget(library call) XmRedisplayWidget(library call)
NAME
XmRedisplayWidget -- Synchronously activates the expose method of a widget to draw its content
SYNOPSIS
#include <Xm/Xm.h>
voidXmRedisplayWidget(
Widgetwidget);
DESCRIPTION
This function is a convenience routine that hides the details of the Xt internals to the application programmer by calling the expose
method of the given widget with a well formed Expose event and Region corresponding to the total area of the widget. If the widget doesn't
have an Expose method, the function does nothing.
This is primarily used in the context of X Printing if the programming model chosen by the application is synchronous; that is, it doesn't
rely of X Print events for the driving of page layout but wants to completely control the sequence of rendering requests.
XmRedisplayWidget doesn't clear the widget window prior to calling the expose method, since this is handled by calls to XpStartPage .
widget The widget to redisplay.
RETURN VALUE
None.
ERRORS
/WARNINGS
Not applicable
EXAMPLES
In the following, a simple application wants to print the content of a multi-page text widget (similar to dtpad).
PrintOKCallback(print_dialog...)
/*-------------*/
{
pshell = XmPrintSetup (print_dialog, pbs->print_screen,
"Print", NULL, 0);
XpStartJob(XtDisplay(pshell), XPSpool);
/**** here I realize the shell, get its size, create my widget
hierarchy: a bulletin board, and then a text widget,
that I stuff with the video text widget buffer */
/* get the total number of pages to print */
XtVaGetValues(ptext, XmNrows, &prows,
XmNtotalLines, n_lines, NULL);
n_pages = n_lines / prows;
/***** now print the pages in a loop */
for (cur_page=0; cur_page != n_pages; cur_page++) {
XpStartPage(XtDisplay(pshell), XtWindow(pshell), False);
XmRedisplayWidget(ptext); /* do the drawing */
XpEndPage(XtDisplay(pshell));
XmTextScroll(ptext, prows); /* get ready for next page */
}
/***** I'm done */
XpEndJob(XtDisplay(pshell));
}
Of course, one could change the above code to include it in a fork() branch so that the main program is not blocked while printing is going
on. Another way to achieve a "print-in-the-background" effect is to use an Xt workproc. Using the same sample application, that gives us:
Boolean
PrintOnePageWP(XtPointer npages) /* workproc */
/*-------------*/
{
static int cur_page = 0;
cur_page++;
XpStartPage(XtDisplay(pshell), XtWindow(pshell), False);
XmRedisplayWidget(ptext); /* do the drawing */
XpEndPage(XtDisplay(pshell));
XmTextScroll(ptext, prows); /* get ready for next page */
if (cur_page == n_pages) { /***** I'm done */
XpEndJob(XtDisplay(pshell));
XtDestroyWidget(pshell);
XtCloseDisplay(XtDisplay(pshell));
}
return (cur_page == n_pages);
}
PrintOKCallback(...)
/*-------------*/
{
pshell = XmPrintSetup (widget, pbs->print_screen,
"Print", NULL, 0);
XpStartJob(XtDisplay(pshell), XPSpool);
/**** here I get the size of the shell, create my widget
hierarchy: a bulletin board, and then a text widget,
that I stuff with the video text widget buffer */
/* get the total number of pages to print */
/* ... same code as above example */
/***** print the pages in the background */
XtAppAddWorkProc(app_context, PrintOnePageWP, n_pages);
}
SEE ALSO
XmPrintSetup(3), XmPrintShell(3)
XmRedisplayWidget(library call)