07-27-2011
shell script to sort information in one file
Hi to all,
anyway to create shell script to sort informations from one file and create new file with the sorted values?
from file 30days.out
-bash-3.00# more 30days.out
user/str4@kl.com/INBOX
user/tg1@johor.com/INBOX
user/tg2@kedah.com/INBOX
user/tg3@titangroup.com/INBOX
user/tg4@titangroup.com/INBOX
user/tmnet1/INBOX
user/tmnet2/INBOX
user/tmnet3/INBOX
user/tmnet4/INBOX
to
str4@kl.com
tg1@johor.com
tg2@kedah.com
tg3@titangroup.com
tg4@titangroup.com
---------- Post updated at 12:07 PM ---------- Previous update was at 11:59 AM ----------
thanks, found out myself with old script from one of the guy here before this,
cat 30days.out | cut -d/ -f2 | uniq -c
case closed.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Can some one provide me a shell script.
I have file with many columns and many rows. need to sort the first column and then remove the duplicates records if exists.. finally print the full data with first coulm as unique.
Sort BASED ON FIRST FIELD and remove the duplicates if exists... (2 Replies)
Discussion started by: tuffEnuff
2 Replies
2. Shell Programming and Scripting
Hello All,
Need a shell script to sort entries in a file by date and time. Below are the entries in the file, i need to sort it first by the date and then time
Note :- Date is in MM/DD/YY format and date comes as the 6th & time comes on 7th coloumns respectively.
150 pbnawldb001-b... (10 Replies)
Discussion started by: ajiwww
10 Replies
3. UNIX for Advanced & Expert Users
Hello all -
I am to this forum and fairly new in learning unix and finding some difficulty in preparing a small shell script. I am trying to make script to sort all the files given by user as input (either the exact full name of the file or say the files matching the criteria like all files... (3 Replies)
Discussion started by: pankaj80
3 Replies
4. Shell Programming and Scripting
Hi Gurus,
I need help in writing a script which should say which user has used or logged in in the server from past one month using FTP or TELNET and the output should be of the form
Username Service NumberofTimes Date.
Thanks in Advance.
---------- Post updated at 04:01 PM... (1 Reply)
Discussion started by: rama krishna
1 Replies
5. Shell Programming and Scripting
Hi to all,
I got this content/pattern from file http.log.20110808.gz
mail1 httpd: Account Notice: close igchung@abc.com 2011/8/7 7:37:36 0:00:03 0 0 1
mail1 httpd: Account Information: login sastria9@abc.com proxy sid=gFp4DLm5HnU
mail1 httpd: Account Notice: close sastria9@abc.com... (16 Replies)
Discussion started by: Mr_47
16 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
I have a network drive that has a directory named "music". In music I have a ton of folders of artists then albums then songs. I wanted to print out all of the songs ordered by artists then albums.
I was trying:
*********************
du -ka | sort
*********************
... (4 Replies)
Discussion started by: Imhotep1963
4 Replies
7. Shell Programming and Scripting
Hello,
I am attempting to learn shell for approx. two weeks. So, sorry if I am writing wrong things. Can a shell script get some information for itself from a site? I can't post the site right know, I don't have privileges. But it can be any site that shows the currency between whatever.... (3 Replies)
Discussion started by: alpa8le
3 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I'm trying to sort 2 different .txt tab delimited files with the command line:
sort -k 1b,1 inputfile > outputfile
But doing that i'm also sorting the header (that ends at the end of my file).
How can i sort a .txt file without sorting the header but conserving the header in the... (3 Replies)
Discussion started by: alisrpp
3 Replies
9. Shell Programming and Scripting
Hi,
I have a file which I need to programmatically split into two files.
All the information in the file before pattern "STOP HERE" is to be stripped and output into one file while everything after "STOP HERE" is to be output into a separate file.
I would appreciate help on how to do... (8 Replies)
Discussion started by: PTL
8 Replies
10. UNIX for Dummies Questions & Answers
I am new to shell scripting. I am interested how to know how to sort a content of a file using shell scripting.
I've attached the 'Input file' and the 'expected output' to this thread.
Details provided in the expected output file will provide details on how the sort needs to be done.
... (16 Replies)
Discussion started by: nkarthik_mnnit
16 Replies
LEARN ABOUT DEBIAN
email-reminder-editor
EMAIL-REMINDER-EDITOR(1) User Contributed Perl Documentation EMAIL-REMINDER-EDITOR(1)
NAME
Email-Reminder-Editor - edit special occasion reminders
SYNOPSIS
Simple editor for modifying special occasion email reminders.
DESCRIPTION
Email-reminder allows users to define events that they want to be reminded of by email. Possible events include birthdays, anniversaries
and yearly events. Reminders can be sent on the day of the event and a few days beforehand.
This is a simple editor that allows users to add/modify their reminders. It saves changes automatically when the program is closed.
OPTIONS
--help
Displays basic usage message.
--simulate
Does not actually save any changes.
--verbose
Prints out information about what the program is doing.
--version
Displays the version number.
FILES
~/.email-reminders
AUTHOR
Francois Marier <francois@email-reminder.org.nz>
SEE ALSO
collect-reminders, send-reminders
COPYRIGHT
Copyright (C) 2004-2010 by Francois Marier
Email-Reminder is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
Email-Reminder is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Email-Reminder; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
perl v5.14.2 2012-05-28 EMAIL-REMINDER-EDITOR(1)