Ok, I finally have some time to work on my Linux system: 1) I added export EDITOR=joe to /etc/profile.local, but when I enter edit at the shell, I happen to enter vi again. Solution? And how can I give options to joe when starting via this alias? is the joerc the correct way or have I to change the whole alias? 2) I set some aliases like alias $='ls -alX', and now I am experiencing that I do not get what I wanted. I would like the appearance of the LS output to be like with doscmd=/o:gen, that is directories sorted in a-z order FIRST, then the a-z sorted FILES. Any thoughts? -- *º¤., ¸¸,.¤º*¨¨¨*¤Oliver@home*º¤., ¸¸,.¤º*¨¨*¤
Your EDITOR variable is joe ivf it is in /etc/profile.local and it isn't overridden by some other entry in .profile or .bashrc. If you give the command crontab -e this will invoke joe instead if the default vi(m). However /usr/bin/edit is a symlink to vim (try ls -l /usr/bin/edit). You can of course change that if you want to. (I wouldn't. vi(m) rocks.) Bottom line: edit doesn't use the EDITOR variable, as opposed to for examle crontab -e, visudo or vipw. torsdagen den 19 april 2001 13:53 skrev Oliver Ob:
Ok, I finally have some time to work on my Linux system:
1) I added export EDITOR=joe to /etc/profile.local, but when I enter edit at the shell, I happen to enter vi again. Solution? And how can I give options to joe when starting via this alias? is the joerc the correct way or have I to change the whole alias?
2) I set some aliases like alias $='ls -alX', and now I am experiencing that I do not get what I wanted. I would like the appearance of the LS output to be like with doscmd=/o:gen, that is directories sorted in a-z order FIRST, then the a-z sorted FILES.
Any thoughts?
I set some aliases like alias $='ls -alX', and now I am experiencing that I do not get what I wanted. I would like the appearance of the LS output to be like under good old dos with "doscmd=/o:gen" or "dir /o:gen", that is directories sorted in a-z order FIRST, then the a-z sorted FILES. Any thoughts?
I set some aliases like alias $='ls -alX', and now I am experiencing that I do not get what I wanted. I would like the appearance of the LS output to be like under good old dos with "doscmd=/o:gen" or "dir /o:gen", that is directories sorted in a-z order FIRST, then the a-z sorted FILES. Any thoughts?
Ok this is the 3rd try now, I hope someone opens his mind and is capable of helping me out with maybe a script or at least a pointer to a file or also any appreciated idea: I wrote: /// I set some aliases like alias $='ls -alX', and now I am experiencing that I do not get what I wanted. I would like the appearance of the LS output to be like under good old dos with "doscmd=/o:gen" or "dir /o:gen", that is directories sorted in a-z order FIRST, then the a-z sorted FILES. Any thoughts? \\\ The apperances of dir /o:gen under DOS 6.2x environment looks sort of this: DIRs a-z FILEs a-z Anyhow, I tried this under Suse 7.0 and I seem not to get what I want. Does anyone have a solution/hint/script for that?
On Thu, Jul 19, 2001 at 11:24:05PM +0200, ob_ok@gmx.net wrote:
I would like the appearance of the LS output to be like under good old dos with "doscmd=/o:gen" or "dir /o:gen", that is directories sorted in a-z order FIRST, then the a-z sorted FILES.
I don't think there is a way to do this directly; you'll have to do it in a script. You could: a) use perl: opendir, readdir, closedir will allow you to read the contents of a directory (to get the ls listing) if(-d xxx) will tell you if an entry is a directory if(! -d xxx) will tell you if an entry is not a directory sort will sort the list into alphanumeric order. b) use a shell script with find: the options you want to look up are: -maxdepth should allow you to restrict your find to just one directory -type d will choose only directories ! -type d will choose only non-directories -ls will run a form of ls on the result or -exec ls <options> '{}' \; will run whatever ls command you want on the result HTH... -- David Smith Tel: +44 (0)1454 462380 (direct) STMicroelectronics Fax: +44 (0)1454 617910 1000 Aztec West TINA (ST only): (065) 2380 Almondsbury Home: 01454 616963 BRISTOL Mobile: 07932 642724 BS32 4SQ Work Email: Dave.Smith@st.com Home Email: David.Smith@ds-electronics.co.uk
Þann laugardagur 21 júlí 2001 11:54 skrifaðir þú:
On Thu, Jul 19, 2001 at 11:24:05PM +0200, ob_ok@gmx.net wrote:
I would like the appearance of the LS output to be like under good old dos with "doscmd=/o:gen" or "dir /o:gen", that is directories sorted in a-z order FIRST, then the a-z sorted FILES.
I don't think there is a way to do this directly; you'll have to do it in a script. You could:
a) use perl: opendir, readdir, closedir will allow you to read the contents of a directory (to get the ls listing) if(-d xxx) will tell you if an entry is a directory if(! -d xxx) will tell you if an entry is not a directory sort will sort the list into alphanumeric order. b) use a shell script with find: the options you want to look up are: -maxdepth should allow you to restrict your find to just one directory -type d will choose only directories ! -type d will choose only non-directories -ls will run a form of ls on the result or -exec ls <options> '{}' \; will run whatever ls command you want on the result
HTH...
ls -l | grep ^d | sort -k 9 ; ls -l | grep -v ^d | sort -k 9 -tosi
Dave Smith wrote:
On Thu, Jul 19, 2001 at 11:24:05PM +0200, ob_ok@gmx.net wrote:
I would like the appearance of the LS output to be like under good old dos with "doscmd=/o:gen" or "dir /o:gen", that is directories sorted in a-z order FIRST, then the a-z sorted FILES.
I don't think there is a way to do this directly; you'll have to do it in a script. You could:
a) use perl: opendir, readdir, closedir will allow you to read the contents of a directory (to get the ls listing) if(-d xxx) will tell you if an entry is a directory if(! -d xxx) will tell you if an entry is not a directory sort will sort the list into alphanumeric order. b) use a shell script with find: the options you want to look up are: -maxdepth should allow you to restrict your find to just one directory -type d will choose only directories ! -type d will choose only non-directories -ls will run a form of ls on the result or -exec ls <options> '{}' \; will run whatever ls command you want on the result
Try this one-liner of wierdnesses: ls -Ud $(ls -Ap | grep '/$') $(ls -Ap | grep -v '/$') (Couldn't resist the challenge!) Paul
Ok this is the 3rd try now, I hope someone opens his mind and is capable of helping me out with maybe a script or at least a pointer to a file or also any appreciated idea: I wrote: /// I set some aliases like alias $='ls -alX', and now I am experiencing that I do not get what I wanted. I would like the appearance of the LS output to be like under good old dos with "doscmd=/o:gen" or "dir /o:gen", that is directories sorted in a-z order FIRST, then the a-z sorted FILES. Any thoughts? \\\ The apperances of dir /o:gen under DOS 6.2x environment looks sort of this: DIRs a-z FILEs a-z Anyhow, I tried this under Suse 7.0 and I seem not to get what I want. Does anyone have a solution/hint/script for that?
participants (5)
-
Anders Dahlqvist
-
Dave Smith
-
Oliver Ob
-
Paul Abrahams
-
Tor Sigurdsson