First of all you have underscores in your strings and not dashes.
By default 'sort' sort alphabetically based on your local.
The octal ASCII value of the underscore is 137
The octal ASCII value of the 1 is 061
And upper case letters start at 101
This is what I get based on your sample after sorting with not switches:
which looks correct based on the previous ASCII value explanation.
I'm in the US. What local are you at?
Hi,
I came across a script a few months ago that allowed you to use the following script to include the current time into your prompt (useful from auditting purposes):
# Set Prompt
typeset -RZ2 _x1 _x2 _x3
let SECONDS=$(date '+3600*%H+60*%M+%S')... (5 Replies)
Hello,
I have been attempting to automate the addition of SSL certificates to keychains on a MAC using the "security" command. I've noticed two things, 1 of which I don't understand.
1. If I use something like "security add-trusted-cert -d -k /System/Library/Keychains/SystemRootCertificates... (1 Reply)
Is it normal behavior for a shell script that terminates to terminate its parent shell when executed with the "." option?
For example, if I have the example script (we'll name it ex.sh):
#!/bin/sh
if
then
echo "Bye."
exit 2
fi
And I execute it like this:
>./ex.sh
It... (6 Replies)
I had a site that sold stock photography and some guys I know set up a shopping cart and gallery system for it. One thing they did was give me an admin page (mysite.net/admin) where I could upload new images and change prices and all that. For that admin page they set a password popup prompt.
I... (4 Replies)
I need to sort the following file by the rhdiskpower devices in the last column:
Total_MB Free_MB OS_MB Name Failgroup Library Label UDID Product Redund Path
1024 851 1024 OCRVOT1_0000 OCRVOT1_0000 System UNKNOWN ... (3 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
I've posted about this before, but only recently narrowed the problem down to a specific cause.
Ok, first of all, the behavior:
It occurs when autocompletion brings up its list (not when there is only a single option). Basically, if I were to type, say,
cd ~/<TAB>
I would get something... (2 Replies)
This really puzzles me. The following code gives me the error 'expr: syntax error' when I try to do multi-line comment using here document
<<EOF
echo "Sum is: `expr $1 + $2`"
EOF
Even if I explicitly comment out the line containing the expr using "#", the error message would still exist... (3 Replies)
Hi there,
I'm running into a very weird situation. Let's forget about the purpose of my initial script please. I noticed the bug whatever I'm trying to do.
I'm on an old server running bash 3.1.17.
Say we have the following script :
foo:~# cat /tmp/test
#!/bin/bash
f1() {
local... (9 Replies)
Hi All,
I have 2 pipe delimited files viz., file_old and file_new. I'm trying to compare these 2 files, and extract all the different rows between them into a new_file.
comm -3 < sort file_old < sort file_new > new_file
I am getting the below error:
-ksh: sort: cannot open
But if I do... (7 Replies)