Sponsored Content
Special Forums UNIX Desktop Questions & Answers Help needed tracing source of bash error Post 302314519 by SilversleevesX on Friday 8th of May 2009 02:10:28 PM
Old 05-08-2009
MySQL Help needed tracing source of bash error

Issue resolved:

The 'culprit file' was .bash_aliases. It had the naughty  (ASCII for the octal string Bash was detecting and returning an error about). I cleaned it up in Pico (see my post to the thread on favorite editors if you want background on why I use Pico/Nano), re-sourced it via .bash_profile, then .bashrc, and everything seems OK. I quit out of my external {yeah, but not really} RXVT and launched it again and the error was gone.

Fingers crossed it stays gone for good.

BZT

Original post text follows.

Quote:
I don't know for sure what I did, but this morning after making a few changes with my title bar and prompt, as soon as I launch my Cygwin RXVT terminal outside of X-Windows, or my urxvt terminal Inside it, I get the following error:

Code:
bash: $'\357\273\277#': command not found

I've seen it on one line, two lines and three. I thought at first it was a UTF-8 with BOM issue, but it doesn't appear to be so. This last launch brought it up after my motd (which I puzzled out has to be "cat"-ed in since there was no other way I could find to show it that worked) and my Quote Of The Day, for which I use the "toy" application fortune to read in from a fortune-cookie file of my own making. To help you visualize this, here's the rest of my startup messages:

Code:
XWindow Server RESURGAM
BASH cygwin in Windows XP SP3
(Amazing, 'ent it?) 
Quote of the day:
Feargail says 'hi.'

I thought this octal-string error may also have been caused by a faulty RXVT, so I ran the setup and re-installed it. Likewise BASH. Just off the top of my head, I'm thinking it may be a corrupt config file that Cygwin's bash is having trouble reading in (parsing) correctly. I've already checked the line endings on everything that rates as a config file and vaguely resembles a bash shell script, and I was able to see and fix a few naughty characters in .bash_profile and .xinitrc. If it is a corrupt startup config file, the question is: which one?

How would I go about finding out which of the files is either bad or refuses to be corrected via editing?

BZT

Last edited by otheus; 05-13-2009 at 11:18 AM.. Reason: Problem Solved (for the moment at least)
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash Source Code

Can somebody give me the link to get the source code of BASH? (1 Reply)
Discussion started by: bhargava
1 Replies

2. UNIX for Advanced & Expert Users

Help needed to test CorneliOS open source software on different platforms

Hello everyone, I' m currently working on an open source project and I'm looking for people willing to test the software on various platforms so that we'll be able to publish a compatibility list. The project is called CorneliOS, it's a webOS and web application framework, and it has been... (0 Replies)
Discussion started by: joskirps
0 Replies

3. Shell Programming and Scripting

Help needed in writing awk script for xml source

Hi, i am not able to get an approach for converting xml file to flat file using awk programming. Can anyone help me out. The input xml is like this: <outer> <field1>one</field1> <field2>two</field2> <field3>three<Error Code=777 Description=12345/></field3> <field4>four</field4> </outer>... (2 Replies)
Discussion started by: naren_0101bits
2 Replies

4. Shell Programming and Scripting

debugging in bash!!! help needed

Hi all, Am using bash shell. Am newbie, trying to understand the debugin process of a shell script... I am unable to comprehend the control flow ,meaning from where exactly the execution of the script begins... I tried using bash-xv <scriptname> but since am new ,am finding it difficult to... (2 Replies)
Discussion started by: wrapster
2 Replies

5. HP-UX

bash...Not found through where(compiling source file)

Hi i have compiled and installed bash 3.2 on my hp-ux parisc its in path /usr/local/pkg/bash/bin/bash .....When im search for this bash (through whereis bash) im not findind but other which i hve done in same procedure( gettext,m4) ..Im able to find through whereis search option can any1... (3 Replies)
Discussion started by: vasanthan
3 Replies

6. Shell Programming and Scripting

bash shell: 'exec', 'eval', 'source' - looking for help to understand

Hi, experts. Whould anybody clear explay me difference and usage of these 3 commands (particulary in bash) : exec eval source I've tryed to read the manual pages but did not get much. Also could not get something useful from Google search - just so much and so not exactly, that is... (3 Replies)
Discussion started by: alex_5161
3 Replies

7. Shell Programming and Scripting

bash if statement help needed

Hi I need a script with an if statement that goes. I need it to search through all files within a directory with the extension .test if it finds the string '71502FSC1206' then do sed 's/71502FSC1206/\n&/g' > send.test If it finds the string '715MCH' or '715JAC' then I need it to move the... (1 Reply)
Discussion started by: firefox2k2
1 Replies

8. Shell Programming and Scripting

Bash Script Help Needed

I have a small script I wrote to look for empty files on a Linux box. It finds the empty files and emails the list to me. That works great. What I need to do now is set a cron job to run the thing every 10 minutes or so (no problems there) but I don't want to get any more emails if the last email... (14 Replies)
Discussion started by: wviands
14 Replies

9. Shell Programming and Scripting

Shell Script Comment code blocks in a bash source file

Just began to learn on Shell Script. I got an exercise from my friend. I know how to make this happen in C, but I'm not familiar with Shell Script. Hope I can get some help from all of you. I want to write a bash script to comment code blocks in a bash source file. What I mean comment is '#', I... (1 Reply)
Discussion started by: HiFuture0801
1 Replies

10. UNIX for Advanced & Expert Users

Rebuilding bash source

so i have many scripts that have to run when the bash source is installed as normal. however, some users have found a way to build bash from source and while doing so, they altered some default settings. my question is, what can i put in my script to check that the "flags.c" binary and... (6 Replies)
Discussion started by: SkySmart
6 Replies
RBASH(1)						      General Commands Manual							  RBASH(1)

NAME
rbash - restricted bash, see bash(1) RESTRICTED SHELL
If bash is started with the name rbash, or the -r option is supplied at invocation, the shell becomes restricted. A restricted shell is used to set up an environment more controlled than the standard shell. It behaves identically to bash with the exception that the follow- ing are disallowed or not performed: o changing directories with cd o setting or unsetting the values of SHELL, PATH, ENV, or BASH_ENV o specifying command names containing / o specifying a filename containing a / as an argument to the . builtin command o specifying a filename containing a slash as an argument to the -p option to the hash builtin command o importing function definitions from the shell environment at startup o parsing the value of SHELLOPTS from the shell environment at startup o redirecting output using the >, >|, <>, >&, &>, and >> redirection operators o using the exec builtin command to replace the shell with another command o adding or deleting builtin commands with the -f and -d options to the enable builtin command o using the enable builtin command to enable disabled shell builtins o specifying the -p option to the command builtin command o turning off restricted mode with set +r or set +o restricted. These restrictions are enforced after any startup files are read. When a command that is found to be a shell script is executed, rbash turns off any restrictions in the shell spawned to execute the script. SEE ALSO
bash(1) GNU Bash-4.0 2004 Apr 20 RBASH(1)
All times are GMT -4. The time now is 09:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy