Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Why doesn't sort -k $number work ?? Post 36639 by kevin80 on Monday 2nd of June 2003 11:38:41 AM
Old 06-02-2003
Question Why doesn't sort -k $number work ??

I know this seems like a stupid question.
I am trying to sort an address book. Some peole have first, middle and last names, some only have first and last names.

Eg:
Bob Hope
John Bon Jovi
etc ..

I want to sort this by last name.
I was thinking of using something like sort -k $variable
So when the name is
bob hope variable=2
jon bon jovi variable=3
Thus sorting by the approriate field.

But as I suspected that doesn't work.
Any ideas ???
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Why doesn't this work?

cat .servers | while read LINE; do ssh jason@$LINE $1 done exit 1 ./command.ksh "ls -l ~jason" Why does this ONLY iterate on the first server in the list? It's not doing the command on all the servers in the list, what am I missing? Thanks! JP (2 Replies)
Discussion started by: jpeery
2 Replies

2. UNIX for Dummies Questions & Answers

my ctrl+c doesn't work

it seams that my ctrl+c and my ctrl+d don't work. if I type a bunch of jiberish on a line and ctrl+c I expect the command to be cancelled and to be given a fresh prompt, but instead it just putts ^C at the end of the line. Also, ctrl+d should close the session, but instead mine just puts ^D at... (3 Replies)
Discussion started by: yankee428
3 Replies

3. Shell Programming and Scripting

sed doesn't work

Hello I' m confused a bit. I want to replace string "&amp" with "&" using this command. sed 's/&amp/&/g' and it doesn't work. Nothing happens. On the other side this works: sed 's/&amp/@/g' or sed 's/&amp/^/g' !!! Can somebody help please? Thanks (3 Replies)
Discussion started by: billy5
3 Replies

4. UNIX for Dummies Questions & Answers

Script doesn't work, but commands inside work

Howdie everyone... I have a shell script RemoveFiles.sh Inside this file, it only has two commands as below: rm -f ../../reportToday/temp/* rm -f ../../report/* My problem is that when i execute this script, nothing happened. Files remained unremoved. I don't see any error message as it... (2 Replies)
Discussion started by: cheongww
2 Replies

5. Shell Programming and Scripting

alias doesn't work

Hi I have put alias ll='ls -la' in .profile file but it doesn't work. On hand it works it looks like the .profile file is not beeing read. How to check whitch file is loaded? ,profile? .bash_profile? My system: SunOS mion 5.10 Generic Shell: /bin/pfksh Thanks (2 Replies)
Discussion started by: miojamo
2 Replies

6. Shell Programming and Scripting

Lipo doesn't work

Hi guys, Am using lipo to merge ppc and i386 version of a static/dylib file based on "file type to load". I am working on Mac OS 10.5.6 and new to shell scripting. Please help me out. This is my code. echo "This file combine ppc and i386 file to form universal library" echo "source... (4 Replies)
Discussion started by: vishwesh
4 Replies

7. Shell Programming and Scripting

HELP: If Doesn't Work in AWK

Hi! I have a somehow big file (almost 3000 lines long and thirteen columns). Some lines have no value at all or, at least, are incomplete. The columns' values that have no data are marked with a "-" and the corresponding line (the line that owns that value) should be discarded and not used. ... (5 Replies)
Discussion started by: Marcelo de Brit
5 Replies

8. Shell Programming and Scripting

echo doesn't work right

Hi,when I run my first shell script,I got something that doesn't work right. I wrote this code in the script. echo -e "Hello,World\a\n"But the screen print like this: -e Hello,World The "-e" wasn't supposed to be printed out. Can anyone help me out?:wall: Many thanks!:) (25 Replies)
Discussion started by: Demon
25 Replies

9. UNIX for Dummies Questions & Answers

Why doesn't this work?

find . -name "05_scripts" -type d -exec mv -f {}/'*.aep\ Logs' {}/.LogFiles \; Returns this failure: mv: rename ./019_0120_WS_WH_gate_insideTEST/05_scripts/*.aep\ Logs to ./019_0120_WS_WH_gate_insideTEST/05_scripts/.LogFiles/*.aep\ Logs: No such file or directory I don't know why it's trying... (4 Replies)
Discussion started by: scribling
4 Replies

10. Shell Programming and Scripting

-ne 0 doesn't work -le does

Hi, I am using korn shell. until ] do echo "\$# = " $# echo "$1" shift done To the above script, I passed 2 parameters and the program control doesn't enter inside "until" loop. If I change it to until ] then it does work. Why numeric comparison is not working with -ne and works... (3 Replies)
Discussion started by: ab_2010
3 Replies
eurephiadm lastlog(7)													     eurephiadm lastlog(7)

NAME
eurephiadm-lastlog - View the eurephia lastlog SYNOPSIS
eurephiadm lastlog [-v|--verbose] [-S|--sortkeys <sort keys>] [<FILTER arguments>] DESCRIPTION
This command will query the lastlog records, which contains information about all logins done with the eurephia-auth plug-in. OPTIONS
-S | --sortkeys <sort key>[,<sort key>[,<sort key>]...] Sorting order of the report. More sort keys can be given, separated by comma. The available sort keys are: uid : User ID certid : Certificate ID ip : IP address where the client connects from vpnip : Assigned IP address on the VPN client status : eurephia connection status login : When the client logged in logout : When the client logged out username : eurephia username macaddr : MAC address of the TUN/TAP interface on the VPN client uicid : User ID/Certificate ID link ID. Related to the IDs provided by eurephiadm usercerts -v | --verbose View detailed lastlog FILTERS
The filters can help reducing the amount of data being reported. Multiple filters may be added, but they will only work as additional "AND" arguments in the query. -c | --certid <Certificate ID> Certificate ID -i | --uid <User ID> Numeric user ID -u | --username <User name> User name -I | --ip-addr <IP address> IP address of remote host -s | --login <YYYY-MM-DD> Login time -e | --logout <YYYY-MM-DD> Logout time -m | --mac-addr <TUN/TAP MAC address> MAC address of remote VPN interface of the client -a | --uicid <Access ID> User ID/Certificate ID link ID. Related to the IDs provided by eurephiadm usercerts SEE ALSO
eurephiadm(7), eurephiadm-certs(7), eurephiadm-users(7), eurephiadm-usercerts(7) AUTHOR
Copyright (C) 2008-2010 David Sommerseth <dazo@users.sourceforge.net> David Sommerseth July 2010 eurephiadm lastlog(7)
All times are GMT -4. The time now is 03:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy