I am having trouble running a .sh file. The code 'x=${file_name:0:$z-11}' is giving me a bad substitution error. However when I run in BASH it works. Thing is when this goes to production the .sh will not be running in BASH. Is there a way to substring a string not in BASH or a way to invoke... (2 Replies)
For e.g I have a file named "relation" which has three coloums i.e
JOHN MARY JACK
PETE ALISIA JONNY
TONY JACKIE VICTOR
If I do
grep -w 'JOHN' relation | awk '{print""$1" is husband of "$2" & father of "$3""}'
It gives out
JOHN i husband of MARY & father of JACK (which is desired... (7 Replies)
ok i have a very simple UNIX script
#!/bin/bash
TERM=ansi;export TERM
PFCMARK=25;export PFCMARK
umask 0000
PFUMASK=000;export PFUMASK
#run for filepro menus and exectuables
echo "###########File Modification Log.############\r" > "/public/appl-fp$(date +%m-%d-%Y).txt"
find /appl/fp/... (10 Replies)
Hey guys. Hopefully this is an easy one but having reference similar problems on the web I still can't fix it.
I am doing a recursive find and replace from a script. Of course I could just run the damn thing from the command line but it's bugging me now and want to get it working.
grep -rl... (4 Replies)
Hello.
I would like to ask your help regarding the cp command. We are using a cp command to create a back-up copy of our file but to no avail. It's just not working. We already checked the file and directory permissions and all seems correct.
We have a script (ftp.script) which calls on... (1 Reply)
I am working with a sh script on a solaris 9 zone (sol 10 host) that grabs information to build the configuration command line. the variables Build64, SSLopt, CONFIGopt, and CC are populated in the script. the script includes
CC=`which gcc`
CONFIGopt=' --prefix=/ --exec-prefix=/usr... (8 Replies)
Hi everyone
I have a problem with my script
If I try directly this command
/usr/bin/nice -n 19 mysqldump -u root --password="******" wiki_schneider -c | nice -n 19 gzip -9 > /point_de_montage/$(date '+%Y%m%d')-wiki-db.sql.gz
It works
But if I simply add this command in a script and... (8 Replies)
Hello all,
I am facing a weird issue while executing a code below -
#!/bin/bash
cd /wload/baot/home/baotasa0/sandboxes_finance/ext_ukba_bde/pset
sh UKBA_publish.sh UKBA 28082015 3
if
then
echo "Param file conversion for all the areas are completed, please check in your home directory"... (2 Replies)
I wish to replace "\\n" with a single white space.
The below does the job on command-line:
$ echo '/fin/app/scripts\\n/fin/app/01/sql' | sed -e 's#\\\\n# #g';
/fin/app/scripts /fin/app/01/sql
However, when i have the same code to a shell script it is not able to get me the same output:... (8 Replies)
Discussion started by: mohtashims
8 Replies
LEARN ABOUT DEBIAN
ppd_emit_to_file
ppd_emit_to_file(3) Library Functions Manual ppd_emit_to_file(3)NAME
ppd_emit_to_file, ppd_emit_to_fd - Output device specific code.
SYNOPSIS
#include <ppd/ppd.h>
gboolean ppd_emit( PpdFile * ppd,FILE *fp,PpdSectionOrder section );
gboolean ppd_emitfd( PpdFile * ppd, int fd,PpdSectionOrder section );
DESCRIPTION
The ppd_emit_* functions output the device specific code appropriate to the specified section that has not already been emitted.. The
PpdFile pointer is obtained from opening a PPD file via the ppd_load(3) family of functions. The section can be any one of the following:
PPD_ORDER_ANY
Option code can be anywhere in the file
PPD_ORDER_DOCUMENT
Option code must be in the DocumentSetup section
PPD_ORDER_EXIT
Option code must be sent prior to the document
PPD_ORDER_JCL
Option code must be sent as a JCL command
PPD_ORDER_PAGE
Option code must be in the PageSetup section
PPD_ORDER_PROLOG
Option code must be in the Prolog section
The sections PPD_ORDER_DOCUMENT and PPD_ORDER_PAGE will also output code from the PPD_ORDER_ANY section.
Once a code section has been emitted it is marked as such and will not be emitted unless it is re-marked.
EXAMPLE
/* Setup code to emitted */
ppd_mark_defaults(ppd);
ppd_mark_option(ppd,"Duplex","DuplexNoTumble");
ppd_mark_option(ppd,"PageSize","A4");
/* Emit initial code (including any reset and JCL code) */
ppd_emit_to_file(ppd,stdout,PPD_ORDER_EXIT);
fputs(ppd->jcl_begin->str,stdout);
ppd_emit_to_file(ppd, stdout, PPD_ORDER_JCL);
fputs(ppd->jcl_ps->str, stdout);
/* Any header comments go here */
...
/* Prolog section */
printf("%%%%BeginProlog0);
ppd_emit_to_file(ppd, stdout, PPD_ORDER_PROLOG);
printf("%%%%EndProlog0);
/* Setup section */
printf("%%%%BeginSetup0);
ppd_emit_to_file(ppd, stdout, PPD_ORDER_DOCUMENT);
printf("%%%%EndSetup0);
/* Main document begins */
for (...) {
printf("%%%%Page: 1 10);
/* Re-mark so that this is emitted on each page */
ppd_mark_option(ppd,"PageSize","A4");
printf("%%%%PageSetup0);
ppd_emit_to_file(ppd, stdout, PPD_ORDER_PAGE);
printf("%%%%EndPageSetup0);
/* Page info goes here */
...
}
/* Send ending JCL code */
fputs(ppd->jcl_end->str,stdout);
SEE ALSO ppd_file_new(3), ppd_file_free(3)ppd_emit_to_file(3)