bash questions
i got some questions about bash, i am using bash-3.1
1. how can i turn off the case sensitivity? you have to type exactly the letters i want to turn this off 2.how do i run files with the extention .run on the command line? |
#1 -- you can't
#2 -- Code:
sh name-of-script.run |
Quote:
Quote:
or sh /path/to/file.run |
.run files are normally simple shell scripts. Just type "sh <run-file>".
Normally it is not possible to turn off case sensitivity. You can turn make globbing case insensitive and also pattern matching, but not in general. Under Linux "filename", "FileName" and "Filename" name different files. So if you had a file for each of that name and you enter "FILENAME". What file should be selected?? |
ah i see thx all
|
Quote:
But is your <SHIFT> key broken? You don't seem to be able to type any CAPITALS. Or spell :(. |
my shift keys are working, whats wrong with my spelling 0_0
i just figure how to mount/adduser and change wms but i dont know how to switch users on the console yet how do you do this? |
Quote:
you switch users by typing 'su <username>' jlinkels |
so how do you disable the case sensitivity in slackware? having to type lower and upper cases is just slowing down productivity. how do you make it auto detect whatever you typing like in dos?
|
Are you aware of Tab completion? Ie type the start of a command or command argument and hit <Tab>.
Evo2. |
Quote:
Dos does not "auto detect" anything when you type-- it simply ignores case, so "dos" and "DoS" and "dOs" will all refer to a file named "DOS". So, if you have one file named "Dos" and you try to create a file named "DOS" it will tell you the file already exists :/ What exactly are you having to type in both cases that is slowing you down so much? I ask because maybe you would like to make some lowercase aliases for commands that are dual-case? For example, if you need to type a command like "PrintItALL", you could make an alias of "printitall" so you could run the command by typing that all in lowercase. Might that help? |
Case insensitivity in DOS is a limitation, not a feature.
|
Quote:
In Slackware it depends on your runlevel. If you have a graphical login, look for the menus (probably at the bottom). There should be a menu called "Sessions" or some such that will list choices like KDE, XVCE, FVWM2, etc., etc. OTOH, if you enter X by typing startx at the console, then it is determined first by ~/.xinitrc. If there is no ~/.xinitrc, it will be determined by a file called "xinitrc" in either /etc/X11 or /etc/X11/xinit (sorry I'm at work on a M$ box :doh: ). That file will probably be a sym-link to xinitrc.<currentwm>. To change your wm, you can delete ~/.xinitrc and create a new symlink as ~/.xinitrc to the desired xinitrc in the /etc/X11 directory describe above, or (better) make a copy of that xinitrc as ~/.xinitrc, and edit it to your liking. |
As long as your bash is compiled with readline support on it you should be able to disable at least the case sensitivity for TAB autocompletion, like this:
Code:
echo 'set completion-ignore-case on' > ~/.inputrc It's the way Linux (and I'd say 100% of UNIX systems) are. It's also the way that real life is. So, people usually write "Dear John" and not "dear john" when writing a letter. It helps to avoid ambiguity and confusion when your best friend is called something like Crystal Lamb. I guess that's also why tredegar above asked about the health state of your SHIFT key, because you don't use any capitals at all in your posts. Not that it harms too much the thread though. |
i never use capitals either (its just an extraneous keystroke).
when i was in college we created a my-shell program in lab. case-insensitivity can theoretically be accomplished by doing something like brushing tr [A-Z] [a-z] across every command the user submits to the command-line but it would likely hinder more than it would help. my systems are usually 90 % case-insensitive because most commands are lower-case and all my filenames dont have weird punctuation like capitals, spaces, ... so i stay sane and productive. |
All times are GMT -5. The time now is 01:13 PM. |