LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-01-2006, 10:16 PM   #1
stellafrank
LQ Newbie
 
Registered: Aug 2006
Posts: 5

Rep: Reputation: 0
Bash:rnz2rnx: Command Not Found


RNZ2RNX is a csh script,the content:
#!/bin/csh -f
#
# C-shell script : CRZ2RNX
# (frontend of CRX2RNX)
# 1996.12.19 created by HATANAKA, Y.
# e-mail: hata@gsi.go.jp
#--------------------------------------------------------------------
if($#argv < 1) then
more << EOF

CRZ2RNX is a C-shell script to recover RINEX files from Compact RINEX files.

Usage : CRZ2RNX CRINEX_files [compressed CRINEX/RINEX]

Wildcard can be used.
Recovered RINEX files are created into current directory.

compressed RINEX/CRINEX --> CRINEX --> RINEX
????????.??m.Z --> ????????.??m
????????.??n.Z --> ????????.??n
????????.??o.Z --> ????????.??o
????????.??d.Z --> ????????.??d --> ????????.??o
????????.??d --> ????????.??o
EOF

exit
endif
#--------------------------------------------------------------------

set PROGRAM = CRX2RNX

unset noclobber

foreach file ($argv[*])

######## uncomment the next line if you want to echo files in process
# echo 'processing ' $file

set file2 = $file:t
if( $file2:e == 'Z') set file2 = $file2:r

set body = $file2:r
set extension = $file2:e
set yy = `echo $extension | cut -c1-2`

if($file =~ *.??m.Z) then
compress $file

else if($file =~ *.??n.Z) then
compress $file

else if($file =~ *.??o.Z) then
compress $file

else if($file =~ *.??d.Z) then
zcat $file | $PROGRAM - > $body.$yy'o'
######## The following is an example of error handling.
######## You may activate or custamize it as you like.
# if($status == 1) then
# rm $body.$yy'o'
# continue
# endif

else if($file =~ *.??d) then
cat $file | $PROGRAM - > $body.$yy'o'
######## see above
# if($status == 1) then
# rm $body.$yy'o'
# continue
# endif

else
endif
end



I put the file in the directory: /home/gamwork/05001/tables
after that,I do this:
[root@zch tables]# chmod +x CRZ2RNX
[root@zch tables]# CRZ2RNX bjfs0010.05d.Z
bash: CRZ2RNX: command not found
why?
I am eager to getting the answer,thanks
 
Old 08-01-2006, 10:49 PM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

The directory that holds your script ( /home/gamwork/05001/tables ) is probably not part of your PATH setting (echo $PATH to check).

If you want to exectue a program that is not in your path you can do the following:

Use the whole path, i.e.:
/home/gamwork/05001/tables/CRZ2RNX bjfs0010.05d.Z

Or, which is shorter and easier:

./CRZ2RNX bjfs0010.05d.Z

Hope this helps.
 
Old 08-01-2006, 10:55 PM   #3
stellafrank
LQ Newbie
 
Registered: Aug 2006
Posts: 5

Original Poster
Rep: Reputation: 0
Thank you very much, I have done according to what you say:
[root@zch tables]# ./CRZ2RNX bjfs0010.05d.Z
CRZ2RNX: Command not found.
 
Old 08-01-2006, 11:03 PM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

I forgot to mention that the ./CRZ2RNX bjfs0010.05d.Z method only works from the directory the script is in. I.e:

cd /home/gamwork/05001/tables
./CRZ2RNX bjfs0010.05d.Z


Sorry about that.
 
Old 08-02-2006, 08:19 AM   #5
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,602

Rep: Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084
Moved: This thread is more suitable in Linux - Newbie and has been moved accordingly to help your thread/question get the exposure it deserves.

--jeremy
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash: rpm: command not found && sudo: alien: command not found Java_Code Ubuntu 7 07-27-2006 11:57 PM
bash: pg: command not found Chomper Programming 2 02-05-2005 02:22 AM
-bash: cp: command not found johnlittlepeap Fedora 2 11-15-2004 08:52 AM
bash: command not found jc80 Fedora 3 03-14-2004 03:11 PM
bash: ll: command not found x2000koh Linux - Newbie 3 08-08-2003 05:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration