I need to sort some data with Unix sort but I can not understand the exact syntax, the data appears < / P>
3. 9.1 Step 10: 3. 9.11 Phase 20: 3.8.10 Step 20: 3.10.2 Step 10: 3.8.4 Phase 9 3.8.4 Phase 100: 3.8.4 Step 10: I want to sort it by using a large number first, then step number, like the above given data.
3.8.4 Phase 10: 3.8.4 Phase 90: 3.8.4 Phase 100: 3.8.10 Phase 20: 3. 9.1 Step 10: 3. 9. 1 step 20: 3.10.2 step 10: I found a way to sort by first number on this site:
sort -t P>
unix sort ('theory and practice in construction a work order routine' , J. L. Linderman, AT & T Bell Labs Tech Journal, October 1984) Unfortunately, not available on the Internet, AFAICT (I saw a year ago and I did not get it, I was again Ekha now, and you can find the reference, but the article does not). In addition to other things, it has been shown in the article that for Unix sorting , compared to the time compared to the time, it is not much surprising (when you think that comparison Per-set of fields per line is compared, there is a question of switching data 'bus indicators). One consequence of this was that they suggest what to suggest; Mapping key is easy to compare. He showed that a simple scripting solution could really save time with hard work. Therefore, you may want to consider using a character that is unlikely to appear in the data file (such as Control-A ) as the key field separator In. sed 's /^\([^.]*\)[[](([^.]* \] [.] \ ([^] * \) Phase \ ( [0- 9] * \): * / \ 1 ^ a \ 2 ^ a \ 3 ^ a \ 4 ^ a and / 'file | sort -t' ^ a '-k1,1n -k2,2n -k3 , 3n-k4,4n | Sed 's /^.*^ A //' The first order is difficult, it identifies the 4 digit areas, and selects the selected character (written < Outputs differently from code> ^ A above, typed as control-A ), and then outputs a copy of the original line. This sequence is then the first four Works numerically on areas, and the last sed earns E in front of each row and the last Ctrl-A original line back again.
Popular posts from this blog
I tried to create a new database in my project, but when I run the script, I get this error, I have another project, this type of definition worked before, but now it gets a single error. I am using Python 2.7.8 and the version of SQLAlchemy module is 0.9.8. By the way, using a project flask- SQLAlchemy, it works well, I'm confused. Traceback information is as follows: Traceback (most recent call final): File "D: / Projects / IOM / db_create.py", line 4, & lt; Module & gt; From the models the base file "D: \ Projects \ OO-IM \ models.py", in line 15, in the & lt; Module & gt; Column ( 'followed_id', int (), ForeignKey ( 'user.id')) file "C: \ Python27 \ lib \ site-packages \ SQLAlchemy \ SQL \ schema.py", line 369, __new__ schema = metadata. Schema file "C: \ Python27 \ lib \ site-packages \ SQLAlchemy \ SQL \ elements.py", line 662, AttributeError in __getattr__ key): Neither 'column' object nor ...
I use Eners to be hibernate to audit my institutions. I have an audit entity, Foo , which includes a list & lt; Bars & gt; However, I do not want to audit the bar institutions, in the form of properties, I have written that: @inti @edicated public class Foo {@JoinTable (name = "T_FOO_BAR", joinColumns = @JoinColumn (name = "FOO_ID"), inverseJoinColumns = @JoinColumn (Name = "BAR_ID")) @ManyToMany (Cascade = Persist) @ Indited (targetAuditMode = RelationTargetAuditMode.NOT_AUDITED ) Public listing & lt; Bars & gt; GetBars () {Return bars; }} Now, I want to retrieve an amendment of foo : AuditReader reader = AuditReaderFactory.get (GetEntityManager ()); FU modification = (FU) reader.CreativeTeA () .entensEtrevision (Foo Class, 42) .getSingleResult (); Unfortunately, when I want to retrieve all the data (i.e. when it loads lazy times ), error me ORA-00942: table or view is not present , because Tried to query this: Sel...
While pagging my user model in kppp, I can sort with some values, but not others. For example, I can order results from created or email , for example, but username or reputation seems to come back order by arbitrary command for example with a list of users: $ this-> paginate = array ('condition' => array ( 'User.is_active' = & gt; true), 'border' => 24, 'order' => array ('User.created' => DESC)); Works as expected, but $ this - & gt; Paged = array ('conditions' = & gt; array (' user.isIactive '= & gt; true),' border '= & gt; 24,' command '= & gt; array (' user repeats' = ' & Gt; DESC ')); No, no. I first thought that this could be a database issue, but when I search the database directly, sorted as expected. Note: I am using Mangodebi with the Mongo DB plugin of Ichikawa for the KPPHP; Pagnetizing users are used to work properl...
Comments
Post a Comment