Sponsored Content
Top Forums Shell Programming and Scripting Bash can't find file but tcsh can why? Post 302499936 by vgersh99 on Friday 25th of February 2011 05:54:27 PM
Old 02-25-2011
Quote:
Originally Posted by muddauber
OK

Code:
[kit@class ~]$ cd antplot/
[kit@class antplot]$ ccantplot
/bin/bash: --norc gcc -I/usr/X11R6/lib -I/usr/X11R6/include/X11 antplot.c get_color.c antinp.c -o runantplot /usr/X11R6/lib/l*: invalid option
Usage:    /bin/bash [GNU long option] [option] ...
    /bin/bash [GNU long option] [option] script-file ...
GNU long options:
    --debug
    --debugger
    --dump-po-strings
    --dump-strings
    --help
    --init-file
    --login
    --noediting
    --noprofile
    --norc
    --posix
    --protected
    --rcfile
    --rpm-requires
    --restricted
    --verbose
    --version
    --wordexp
Shell options:
    -irsD or -c command or -O shopt_option        (invocation only)
    -abefhkmnptuvxBCHP or -o option
[kit@class antplot]$ cat ccantplot
#!/bin/bash --norc gcc -I/usr/X11R6/lib -I/usr/X11R6/include/X11 antplot.c get_color.c antinp.c -o runantplot /usr/X11R6/lib/l*.a -lm
[kit@class antplot]$ exit
exit
Script done on Fri 25 Feb 2011 05:47:21 PM EST

I must be getting tired as well Smilie
This is not what I posted in my modified script - it should not be all on ONE FIRST line.
Once again:
Code:
#!/bin/bash --norc
pwd

gcc -I/usr/X11R6/lib -I/usr/X11R6/include/X11 antplot.c get_color.c antinp.c -o runantplot /usr/X11R6/lib/l*.a -lm

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to : Find duplicate number from file? with bash

Thanks AVKlinux (6 Replies)
Discussion started by: avklinux
6 Replies

2. UNIX for Dummies Questions & Answers

$ in sed under tcsh vs bash

In bash, I can match the ' character in a substition involving the line ending symbol $, easily. In tcsh I ran into a problem. Code: sed "s/$/'/g" filename sed "s/$/'/g" < filename sed -e "s/$/'/g" filename Unmatched '. Where can I find out why this is the case? (2 Replies)
Discussion started by: uiop44
2 Replies

3. Shell Programming and Scripting

for / foreach syntax issues (in bash or tcsh)

So I am new to unix, and actually anything outside drag and drop with the mouse (been learning for about a week so far) . I have been using the foreach command in tcsh because I am working on a group of files. Basically what I need is to insert part of the filename as the first line in the file.... (0 Replies)
Discussion started by: thepolypore
0 Replies

4. HP-UX

How to find tcsh shell version info in HP-UX?

Hi, I need to find tcsh shell version info on several boxes. I made a script and running on boxes through SSH. This is what i am doing : echo /bin/tcsh -c 'echo $version' | ssh "box name" but i dont see anything. if i run /bin/tcsh -c 'echo $version' on ocal machine i see the... (2 Replies)
Discussion started by: kailash19
2 Replies

5. UNIX for Dummies Questions & Answers

An alternative to BASH/TCSH?

Greetings! I love the power and control offered by BASH but detest its syntax! Is there some alternative *nix shell language? (other than TCSH) Or maybe a wrapper that affords the use of BASH commands via an easier syntax? I considered creating a complicated system of aliases to... (8 Replies)
Discussion started by: Koalaboration
8 Replies

6. Shell Programming and Scripting

#!/bin/bash cannot find file or directory

Hello, When i run a bash script on ubuntu i get this message.. #!/bin/bash cannot find file or directory... Can anibody help me with this, because the file actually exists.... Is there any extra configuration to be made? (5 Replies)
Discussion started by: oliveiraum
5 Replies

7. Shell Programming and Scripting

Bash script to find comments in file

As I stated in a previous thread - I'm a newbie to Unix/Linux and programming. I'm trying to learn the basics on my own using a couple books and the exercises provided inside. I've reached an exercise that has me stumped. I need to write a bash script that will will read in a file and print the... (11 Replies)
Discussion started by: ksmarine1980
11 Replies

8. Shell Programming and Scripting

Bash tcsh Script runs in terminal but not folder

So, I made a script beginning with #!/bin/bash on gedit. And I double clicked it to run in terminal and I end up with "The child process exited normally with status 127" and "command not found". If I run the same script from the terminal as "tcsh (script name)" it runs just fine. If I... (8 Replies)
Discussion started by: OntorEska
8 Replies

9. Shell Programming and Scripting

Find matching file in bash with variable file names but consisent prefixs

As part of a bash the below line strips off a numerical prefix from directory 1 to search for in directory 2. for file in /home/cmccabe/Desktop/comparison/missing/*.txt do file1=${file##*/} # Strip off directory getprefix=${file1%%_*.txt} ... (5 Replies)
Discussion started by: cmccabe
5 Replies

10. UNIX for Beginners Questions & Answers

Bash command to find a file and print contents

I need to find a file and print its contents I am trying but it is not working find -path /opt/app-root/src/.npm/_logs -type f -name "*.log" -print Version $ bash -version GNU bash, version 4.4.12(1)-release (x86_64-pc-msys) (1 Reply)
Discussion started by: SVRao19056
1 Replies
XtResolvePathname(3Xt)						   XT FUNCTIONS 					    XtResolvePathname(3Xt)

NAME
XtResolvePathname - search for a file using standard substitution SYNTAX
String XtResolvePathname(Display *display, String type, String filename, String suffix, String path, Substitution substitutions, Cardinal num_substitutions, XtFilePredicate predicate); ARGUMENTS
display Specifies the display to use to find the language for language substitutions. type filename suffix Specify values to substitute into the path. path Specifies the list of file specifications, or NULL. substitutions Specifies a list of additional substitutions to make into the path, or NULL. num_substitutions Specifies the number of entries in substitutions. predicate Specifies a procedure called to judge each potential file name, or NULL. DESCRIPTION
The substitutions specified by XtResolvePathname are determined from the value of the language string retrieved by XtDisplayInitialize for the specified display. To set the language for all applications specify ``*xnlLanguage: lang'' in the resource database. The format and content of the language string are implementation-defined. One suggested syntax is to compose the language string of three parts; a ``language part'', a ``territory part'' and a ``codeset part''. The manner in which this composition is accomplished is implementation- defined and the Intrinsics make no interpretation of the parts other than to use them in substitutions as described below. XtResolvePathname calls XtFindFile with the following substitutions in addition to any passed by the caller and returns the value returned by XtFindFile: %N The value of the filename parameter, or the application's class name if filename is NULL. %T The value of the type parameter. %S The value of the suffix parameter. %L The language string associated with the specified display. %l The language part of the display's language string. %t The territory part of the display's language string. %c The codeset part of the display's language string. %C The customization string retrieved from the resource database associated with display. %D The value of the implementation-specific default path. If a path is passed to XtResolvePathname, it will be passed along to XtFindFile. If the path argument is NULL, the value of the XFILE- SEARCHPATH environment variable will be passed to XtFindFile. If XFILESEARCHPATH is not defined, an implementation-specific default path will be used which contains at least 6 entries. These entries must contain the following substitutions: 1. %C, %N, %S, %T, %L or%C, %N, %S, %T, %l, %t, %c 2. %C, %N, %S, %T, %l 3. %C, %N, %S, %T 4. %N, %S, %T, %L or %N, %S, %T, %l, %t, %c 5. %N, %S, %T, %l 6. %N, %S, %T The order of these six entries within the path must be as given above. The order and use of substitutions within a given entry is imple- mentation dependent. If the path begins with a colon, it will be preceded by %N%S. If the path includes two adjacent colons, %N%S will be inserted between them. The type parameter is intended to be a category of files, usually being translated into a directory in the pathname. Possible values might include ``app-defaults'', ``help'', and ``bitmap''. The suffix parameter is intended to be appended to the file name. Possible values might include ``.txt'', ``.dat'', and ``.bm''. A suggested value for the default path on POSIX-based systems is /usr/X11R6/lib/X11/%L/%T/%N%C%S:/usr/X11R6/lib/X11/%l/%T/%N%C%S: /usr/X11R6/lib/X11/%T/%N%C%S:/usr/X11R6/lib/X11/%L/%T/%N%S: /usr/X11R6/lib/X11/%l/%T/%N%S:/usr/X11R6/lib/X11/%T/%N%S Using this example, if the user has specified a language, it will be used as a subdirectory of /usr/X11R6/lib/X11 that will be searched for other files. If the desired file is not found there, the lookup will be tried again using just the language part of the specification. If the file is not there, it will be looked for in /usr/X11R6/lib/X11. The type parameter is used as a subdirectory of the language directory or of /usr/X11R6/lib/X11, and suffix is appended to the file name. The %D substitution allows the addition of path elements to the implementation-specific default path, typically to allow additional direc- tories to be searched without preventing resources in the system directories from being found. For example, a user installing resource files under a directory called ``ourdir'' might set XFILESEARCHPATH to %D:ourdir/%T/%N%C:ourdir/%T/%N The customization string is obtained by querying the resource database currently associated with the display (the database returned by XrmGetDatabase) for the resource application_name.customization, class application_class.Customization where application_name and applica- tion_class are the values returned by XtGetApplicationNameAndClass. If no value is specified in the database, the empty string is used. It is the responsibility of the caller to free the returned string using XtFree when it is no longer needed. SEE ALSO
X Toolkit Intrinsics - C Language Interface Xlib - C Language X Interface XFree86 Version 4.7.0 XtResolvePathname(3Xt)
All times are GMT -4. The time now is 04:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy