-   Linux - Newbie (
-   -   bash shell script appends '?' to filenames (

sceptreofjudah 03-04-2004 04:09 PM

bash shell script appends '?' to filenames
I have been attempting to run my old korn shell unix scripts on linux Redhat 9.0. I'm fairly new to linux but familiar with unix and am running into problems with it.

Right now, if i use a simple bash script in a file say: cat file.m4 > file.css

the resultant file name is: file.css?

If I just enter the above command from the shell it works fine, but if I put in a script file and run it, I get that darned '?' appended to the file name.


Falco 03-04-2004 04:23 PM

I tried to do what you said, but it had gone right with my shell. (without the '?' appended to the "file.css")
maybe it's your bash environment which has some wrong settings.

sceptreofjudah 03-05-2004 11:27 PM

I must have have typo'ed a non-displaying control character in my script. I deleted the file and retyped from scratch and everything worked ok then!

iluvunix22 03-18-2004 09:54 AM

bash shell scripts
Hi, I am new to Linux and I have a question about a bash shell script. The script is to take one or more command line arguments and looks for those as files in subdirectories of the current directory. If the file is found in a subdirectory print a message that the file, print the name of the file is found exists in directory print the name of directory also. Otherwise file does not exist. Ignore all files, links in the current directory. After all subdirectories are searched print out a message that you are done processing the current directory( print its name).

What I have so far is
if ["$var"!=""]; then
if ["${var%${var#?}}"="/"]; then
if [! -x $ var]; then
return 1
elif !in_path_$var $PATH; then
return 2
if [$# -ne 1]; then
echo "Usage: $0 command"> & 2; exit 1
CheckforCmdInPath "$1"
case $ 1 in
0) echo $1 found in PATH;;
1) echo $1 not found;;
2) echo $1 not found in PATH;;
exit 0
What I have is not working. Any help is appreciated

All times are GMT -5. The time now is 03:28 PM.