Sponsored Content
Top Forums Programming help with unix command exec1 in C Post 302504475 by omega666 on Monday 14th of March 2011 05:33:28 PM
Old 03-14-2011
when I run it using ls, i get

my_prog.c
my_prog
abc
my_prog.c
my_prog
abc
Ù·Eið·8ið·ÊØ·
0

Why is this "Ù·Eið·8ið·ÊØ·" coming up when i do printf, I dont understand what you mean by adding NULL's. How can i printf it while making the output of what i want to only come up, and not that gibberish stuff?
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

wc command help.... and other unix command....... urgent

hi all. thanks for looking i am doing some homework. one question is that when type wc and then how to tell the program that we have finished entering data? also why do some operating systems report 22 as the number of bytes in the file above, while others only 20? thanks so much,... (1 Reply)
Discussion started by: dashi2k
1 Replies

2. Shell Programming and Scripting

How to use more than one MPE command STREAM with Unix command in a single shell?

Hello, I have problem in writing the shell script involving MPE command STREAM related to HP-UX and Unix command. Script is sh "nlshCMD 'STREAM <job name1>' | 'SHOWJOB' | grep $HPJOBNUM" sh "nlshCMD 'STREAM <job name2>' | 'SHOWJOB' | grep $HPJOBNUM" sh "nlshCMD 'STREAM <job name3>' |... (0 Replies)
Discussion started by: bosskr
0 Replies

3. HP-UX

How to use more than one MPE command STREAM with Unix command in a single shell?

Hello, I have problem in writing the shell script involving MPE command STREAM related to HP-UX and Unix command. Script is sh "nlshCMD 'STREAM <job name1>' | 'SHOWJOB' | grep $HPJOBNUM" sh "nlshCMD 'STREAM <job name2>' | 'SHOWJOB' | grep $HPJOBNUM" sh "nlshCMD 'STREAM <job name3>' |... (1 Reply)
Discussion started by: bosskr
1 Replies

4. Shell Programming and Scripting

assign a command line argument and a unix command to awk variables

Hi , I have a piece of code ...wherein I need to assign the following ... 1) A command line argument to a variable e.g origCount=ARGV 2) A unix command to a variable e.g result=`wc -l testFile.txt` in my awk shell script When I do this : print "origCount" origCount --> I get the... (0 Replies)
Discussion started by: sweta_doshi
0 Replies

5. UNIX for Advanced & Expert Users

unix command : how to insert text at the cursor location via command line?

Hi, Well my title isn't very clear I think. So to understand my goal: I have a script "test1" #!/bin/bash xvkbd -text blabla with xbindkeys, I bind F5 key in order it runs my test1 script So when I press F5, test1 runs. I'm under Emacs/Vi and I press F5 in order to have "blabla" be... (0 Replies)
Discussion started by: xib.be
0 Replies

6. UNIX for Dummies Questions & Answers

New to Unix command line and have a question about the "sort" command

I am going through the Unix Made Easy second edition book by John Muster. So far it's been very informative and I can tell it may be a bit out of date. In one of the exercises it talks about the "sort" command and using it to sort column's of data etc. The "sort" command has changed a bit and... (1 Reply)
Discussion started by: budfoxcat
1 Replies

7. UNIX Desktop Questions & Answers

Can Unix access Windows' File through Command Prompt in Unix

Hi all, I wish to know whether Unix can access window's file in Unix's terminal? Apart from that, how to copy files or share files between Window and Unix? I get to know of secure copy, however, my company's Unix does not support the feature of secure copy? Any other method for me to share/... (5 Replies)
Discussion started by: jessy83
5 Replies

8. Shell Programming and Scripting

Specify an entire UNIX command as a command line argument

I'm trying to write a bash script called YN that looks like the following YN "Specify a question" "doThis" "doThat" where "doThis" will be executed if the answer is "y", otherwise "doThat". For example YN "Do you want to list the file dog?" "ls -al dog" "" Here's my attempt... (3 Replies)
Discussion started by: LeoKSimon
3 Replies

9. Shell Programming and Scripting

UNIX command to copy files from Windows to UNIX box

Hi Folks, I have a file name abc.xml in my windows machine at the location c:\ytr\abc.xml which I want to place at the unix box machine inside cde directory.. at the following location that is /opt/app/cde/ now the credentials of unix box are abc345 -->(dummyid) ftyiu88--->(dummy passwd) ... (4 Replies)
Discussion started by: punpun66
4 Replies
PMKFILE(5)						      BSD File Formats Manual							PMKFILE(5)

NAME
pmkfile -- pmk specification file DESCRIPTION
pmkfile is a file containing specifications that help configuring a package build on a given platform. SYNTAX
See pmksyntax.5 to have an overview of the basic syntax of pmkfiles. SPECIFIC COMMANDS
The following commands have no label. SETTINGS This command sets pmk parameters. Arguments: AC_COMPAT type is 'quoted', enable autoconf compatibility (empty string or filename). LANG type is 'quoted', global default language. TARGET type is 'list', list of target's filenames. DETECT type is 'list', list of languages (compilers to identify). For example: SETTINGS { AC_COMPAT="config.h" LANG="C" TARGET=("src/file.c","src/file.h") DETECT=("CC") } DEFINE This command permits to define variables. Arguments: Those are the variables to be defined (quote data type only). For example: DEFINE { PACKAGE="my_prog" VERSION="0.1" } SWITCHES This command is setting dependency switches (see further DEPEND definition). Arguments: For example: SWITCHES { use_curses=TRUE use_gtk=FALSE } STANDARD COMMANDS
All these commands need a label. They can all have the following optional arguments: REQUIRED Specify if this test is required to achieve the configuration. Type is 'bool'. If not specified, it is TRUE by default. DEPEND Specify check dependencies. Type is 'list'. A dependency is a label or a switch name. The value of each dependency can be negated by adding a leading '!' sign. If at least one of the dependencies is false then the check will be disabled. For example: DEPEND = ("header_gtk","!header_qt") DEFS Specify additional defines. Type is 'list'. If the check succeeds then the given defines are also recorded else they are ignored. Some of these commands can also have the following arguments: LANG Specify the language used in the following list: C, C++ Type is 'quoted', by default "C" is the used language. Here the list of commands: CHECK_BINARY Check if a binary is in the path. Arguments: REQUIRED DEPEND DEFS NAME type is 'quoted', name of the binary. VARIABLE type is 'quoted', variable name to store the path. CHECK_HEADER Check language header and optionally a function. Arguments: REQUIRED DEPEND DEFS LANG NAME type is 'quoted', name of the header. MACRO type is 'list', list of one or more compiler macros to check, optional. FUNCTION type is 'quoted' or 'list', name or list of functions to check, optional. CFLAGS type is 'quoted', variable name to store CFLAGS values, optional. SUBHDR type is 'list', list of header dependencies, optional. CHECK_LIB Check a library and optionally a function. Arguments: REQUIRED DEPEND DEFS LANG NAME type is 'quoted', name of the library to check. FUNCTION type is 'quoted' or 'list', name or list of functions to check, optional. LIBS type is 'quoted', variable name to store LIBS values, optional. CHECK_CONFIG Check using a *-config tool. Arguments: REQUIRED DEPEND DEFS NAME type is 'quoted', config tool name. VERSION type is 'quoted', minimal version needed, optional. CFLAGS type is 'quoted', variable name to store CFLAGS values, optional. LIBS type is 'quoted', variable name to store LIBS values, optional. VARIABLE type is 'quoted', variable name to store the path of the config tool, optional. CHECK_PKG_CONFIG Check a package using pkg-config. Arguments: REQUIRED DEPEND DEFS NAME type is 'quoted', package name. VERSION type is 'quoted', minimal version needed, optional. CFLAGS type is 'quoted', variable name to store CFLAGS values, optional. LIBS type is 'quoted', variable name to store LIBS values, optional. CHECK_TYPE Check if the given type exists. Arguments: REQUIRED DEPEND DEFS LANG NAME type is 'quoted', name of the type to check. HEADER type is quoted, name of the header where to find the given type. MEMBER type is quoted, name of a member of the structure given in NAME to be checked. CHECK_VARIABLE Check if the given variable does exist and optionally its value. Arguments: REQUIRED DEPEND DEFS NAME type is 'quoted', name of the variable to check. VALUE type is 'quoted', value to check with the variable, optional. CONDITIONAL COMMANDS
IF(expression) It contains other commands that will be executed only if the given expression is true. Arguments: For example: IF(header_gtk) { DEFINE { HAVE_GTK = "1" } } ELSE(expression) It contains other commands that will be executed only if the given expression is false. Arguments: For example: ELSE(header_glib) { DEFINE { HAVE_GLIB = "0" } } LIBRARY NAME BUILDING
BUILD_LIB_NAME This command helps you to build static and/or shared library name(s) depending on the rules of the host operanding system. Arguments: NAME type is 'quoted', name of the library (without leading 'lib'). MAJOR type is 'quoted', major number for the version, optional. MINOR type is 'quoted', minor number for the version, optional. SHARED type is 'quoted', variable that will be set with the shared library name, optional. STATIC type is 'quoted', variable that will be set with the static library name, optional. VERSION type is 'boolean', boolean value for library version processing , optional. For example: BUILD_LIB_NAME { NAME = "test" STATIC = "TESTLIB_STATIC" SHARED = "TESTLIB_SHARED" MAJOR = "0" MINOR = "2" VERSION = TRUE } BUILD_SHLIB_NAME This command has been obsoleted by the BUILD_LIB_NAME command. SEE ALSO
pmk(1), pmkscan(1), pmksyntax.5 BSD
April 27, 2003 BSD
All times are GMT -4. The time now is 08:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy