LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-20-2012, 06:04 PM   #1
aracelly3980
LQ Newbie
 
Registered: Nov 2012
Posts: 1

Rep: Reputation: Disabled
Helpme shell


I fix this?
I change the order of fields in the files that come before the SORT
help
example is the correct order 00012 | CHP | 2
but then passes the sort you change it to chp | 00,012 | 2

mv -f $nombre.s $nombre
join -t\| -1 2 -2 1 $nombre $RUTA_SAC/$nombre_archivo.s>>$archivo46.s


join -t\| -v1 -1 2 -2 1 $nombre $RUTA_SAC/$nombre_archivo.s|sort -T/tempo -t\| -k1,1>$RUTA_SAC/$nombre.s

mv -f $archivo46.s $archivo46

sort -T/tempo -t\| -k1,1 $archivo46>$RUTA_SAC/$archivo46.s


#rm -f $archivo46
#rm -f $nombre
 
Old 11-21-2012, 01:58 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Ummm ... that's a VERY unclear example, and I don't understand what you're
doing. Can you please post sample data from all files involved?

'sort' as such doesn't manipulate the order of fields; your varied joins
do. A bit more input would go a long way in helping you.


Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
helpme!!! vinodinmani Linux - Newbie 18 12-07-2012 12:59 AM
helpme palamalai Linux - Software 1 09-20-2012 06:38 AM
Helpme universalgate Linux - Newbie 1 10-03-2008 07:10 AM
Helpme! smita Linux - General 2 06-09-2004 01:48 PM
helpme xtreme3232 Linux - General 3 12-21-2002 01:24 PM


All times are GMT -5. The time now is 09:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration