Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-04-2004, 04:09 PM   #1
LQ Newbie
Registered: Mar 2004
Posts: 2

Rep: Reputation: 0
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.

Old 03-04-2004, 04:23 PM   #2
LQ Newbie
Registered: Feb 2004
Distribution: slackware,mandrake,suse
Posts: 9

Rep: Reputation: 0
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.
Old 03-05-2004, 11:27 PM   #3
LQ Newbie
Registered: Mar 2004
Posts: 2

Original Poster
Rep: Reputation: 0
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!
Old 03-18-2004, 09:54 AM   #4
LQ Newbie
Registered: Mar 2004
Location: North Carolina
Posts: 1

Rep: Reputation: 0
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 shell script moodupani Linux - General 2 09-01-2005 07:14 AM
Bash Shell script bd1308 Linux - Hardware 9 08-22-2005 06:38 PM
bash shell script globeTrotter Linux - Newbie 5 06-03-2004 06:07 AM
bash/shell script mikis Programming 2 10-14-2003 12:39 PM
BASH shell script help ewarmour Programming 8 05-24-2002 08:57 AM > Forums > Linux Forums > Linux - Newbie

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

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