logo
down
shadow

Sort a file broken into sections by (DOW MON DD YY) date in each section's header


Sort a file broken into sections by (DOW MON DD YY) date in each section's header

Content Index :

Sort a file broken into sections by (DOW MON DD YY) date in each section's header
Tag : linux , By : Gabriel
Date : November 29 2020, 04:01 AM

like below fixes the issue Based on @jchevali's comment - one just needs to find a printable character that both awk and tr can handle gracefully that's not in the text to be processed:
awk '/^*/{printf "%s ^",$0} /^-/{printf "%s ^",$0} /^[ \t]*$/{printf "\n"}' paras | sort -n -t" " -k5 -k3M -k4  | tr '^' '\n'

* Wed Jan 17 2001 Bernhard Rosenkraenzer <bero@mail.com> 
- Add missing man pages, fix up init script (Bug #17676) 
- Can be patched in for future release. 

* Mon Jan 29 2001 Bernhard Rosenkraenzer <bero@mail.com> 
- Some fixes to init scripts 

* Thu Feb 1 2001 Trond Eivind Glomsrød <teg@mail.com> 
- Fix check for ipchains

Comments
No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

adding header sections to my listview... how to add these sections according to my code


Tag : android , By : Michael T.
Date : March 29 2020, 07:55 AM
Does that help Using your current code, try modifying your arrays slightly like this:
int[] img = { null, R.drawable.brazil_flag, R.drawable.croatian_flag,
        R.drawable.mexico_flag, R.drawable.cameroon_flag, null, R.drawable.spain,
        R.drawable.netherlands_flag, R.drawable.czech_republic_flag,
        R.drawable.australia, null, ... };

String[] name = { "Group A", "BRA", "CRO", "MEX", "CMR", "Group B","ESP", "NED", "CHI", "AUS", ... };
@Override
public View getView(int position, View convertView, ViewGroup parent) {
    // TODO Auto-generated method stub
    layoutInflater = (LayoutInflater) context
            .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    View row = null;
    /// inflate a header view here
    if (itemDetailsarrayList.get(position).getImage()==null) {
            row = layoutInflater.inflate(R.layout.row_group_header, parent,
            false);
            TextView txt = (TextView) row.findViewById(R.id.groupTitle);
            txt.setText(itemDetailsarrayList.get(position).getName());
    /// Inflate your regular item row here.
    } else {
            row = layoutInflater.inflate(R.layout.row_list_group, parent,
            false);
            TextView txt = (TextView) row.findViewById(R.id.textView1);
            ImageView imgv = (ImageView) row.findViewById(R.id.imageView1);
            txt.setText(itemDetailsarrayList.get(position).getName());
            imgv.setImageResource(itemDetailsarrayList.get(position).getImage());
    }
    return row;
}
/// FILE: res/layout/row_group_header.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    android:background="#000"
    android:padding="5dip" >

    <TextView
        android:id="@+id/groupTitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:layout_toRightOf="@+id/imageView1"
        android:textColor="#FFF"
        android:ems="10" />

</RelativeLayout>

HTML table should repeat header on every page and Sections should not be broken into 2 pages


Tag : html , By : user126922
Date : March 29 2020, 07:55 AM
With these it helps You can accomplish what you want with some css and html:
1) Use thead tags. As the doc says:
<style type="text/css">
    ... your css ... 

    thead tr {
        padding-top: 100px;
    }
</style>

Is it possible to have multiple sections in UItableView i.e: Section 1 has two sections and these two sections have mult


Tag : ios , By : walshtp
Date : March 29 2020, 07:55 AM
I wish did fix the issue. UITableView has no built in support for this but you could create something yourself with some custom headers and cells.
basically create a model to support the structure:
let model = [[[a, b],[c,d]],[[e,f],[g,h]]]
let subSections = model[section]
var topLevelRow = indexPath.row
for subSection in subSections {
    if topLevelRow < subSection.count {
        print(subSection[topLevelRow])
        break
    } else {
        topLevelRow -= subSection.count
    }
}

Is -ffunction-sections -fdata-sections and --gc-sections not working?


Tag : c , By : user183345
Date : March 29 2020, 07:55 AM
may help you . The compilation options -ffunction-sections -fdata-sections and linkage option --gc-sections are working correctly in your example. Your static library is superfluous, so it can be simplified to:
$ gcc -ffunction-sections -fdata-sections -c main.c getall.c
$ gcc -Wl,--gc-sections main.o getall.o -Wl,-Map=mapfile
$ nm a.out | grep get
0000000000000657 T get1
...
Discarded input sections
...
 .text.get2     0x0000000000000000        0xd getall.o
 .text.get3     0x0000000000000000        0xd getall.o
...
$ strings a.out | egrep 's97symmqdn-(1|2|3)'
s97symmqdn-1
s97symmqdn-2
s97symmqdn-3
$ objdump -s -j .rodata a.out

a.out:     file format elf64-x86-64

Contents of section .rodata:
 06ed 73393773 796d6d71 646e2d31 00733937  s97symmqdn-1.s97
 06fd 73796d6d 71646e2d 32007339 3773796d  symmqdn-2.s97sym
 070d 6d71646e 2d3300                      mqdn-3.
const char *get1()
{
    static const char s[] = "s97symmqdn-1";
    return s;
}


const char *get2()
{
    static const char s[] = "s97symmqdn-2";
    return s;
}

const char *get3()
{
    static const char s[] = "s97symmqdn-3";
    return s;
}
...
Discarded input sections
...
 .text.get2     0x0000000000000000        0xd getall.o
 .text.get3     0x0000000000000000        0xd getall.o
 .rodata.s.1797
                0x0000000000000000        0xd getall.o
 .rodata.s.1800
                0x0000000000000000        0xd getall.o
...
$ objdump -s -j .rodata.s.1797 getall.o

getall.o:     file format elf64-x86-64

Contents of section .rodata.s.1797:
 0000 73393773 796d6d71 646e2d32 00        s97symmqdn-2.
$ objdump -s -j .rodata.s.1800 getall.o

getall.o:     file format elf64-x86-64

Contents of section .rodata.s.1800:
 0000 73393773 796d6d71 646e2d33 00        s97symmqdn-3.
$ strings a.out | egrep 's97symmqdn-(1|2|3)'
s97symmqdn-1
$ objdump -s -j .rodata a.out

a.out:     file format elf64-x86-64

Contents of section .rodata:
 06f0 73393773 796d6d71 646e2d31 00        s97symmqdn-1.

About -ffunction-sections -fdata-sections and --gc-sections options


Tag : gcc , By : TC.
Date : March 29 2020, 07:55 AM
Related Posts Related QUESTIONS :
  • escaping complicated command line arguments in bash and ssh
  • Filtering files with the given range of inputin perl
  • Save cat command output to file
  • How to find all image tags of a running Docker container?
  • A working linux kernel + gem5 config for FS boot up in x86 SMP
  • Run script skipping files
  • How to trap exit (ctrl+c) signal in Makefile?
  • How to read a file using cat with Perl -e parameters?
  • why '~' tilde directory is created automatically in home directory on AWS EC2 instance
  • Remove the first capitalized word after a period
  • Adding a security feature to the ssh login
  • How to merge column output to the end of a row in the previous column?
  • How to write a custom device registration function for custom device such as RTC or ADC etc.?
  • Linux command to delete all the files older than the latest modified file/s
  • The sort command in linux does not work "correctly"
  • Atomic read and truncate of file in linux
  • Zip files within the directory without file extensions
  • How to prevent changes to the underlying file after mmap()-ing a file from being visible to my program?
  • OpenJDK9 Missing in Alpine Linux
  • Insert data into database using sqlldr in coldfusion
  • Can't realize alias/substitution function for my .bashrc
  • Can ack/ag/grep print function name?
  • How to extract log using bash script between a date / time and another
  • Homework: Trying to calculate Easter using arithmetic evaluations
  • How to loop through an output and format the result into a new report?
  • How to add verbosity option to control script output?
  • xm64 fills my processor resource in Linux Mageia 6
  • Measuring temperature while benchmarking on Linux
  • Grep using a regular expression and capturing using groups
  • Getopts default case bash script
  • C can I open a directory's files using open dir in an alphabetical order?
  • Get a tag value in multi line XML using shell script
  • Errors while execute 'make' command, debian
  • How to speed up grep/awk command?
  • Why does calling the C abort() function from an x86_64 assembly function lead to segmentation fault (SIGSEGV) instead of
  • Passing commandline argument to qml
  • Bash command with pipe not working in crontab
  • DBD-Oracle (1.74 or 1.76) with oracle instantclient 11.2 on win10 wsl ubuntu
  • How can I use Bash to contract/shrink a set of values
  • sed only print substring in a string
  • How to make find . -name "*.txt" | xargs grep "text" to work with filename with spaces
  • numeric variable in egrep regular expression bash script
  • How to use case to identify a specific pattern in BASH script
  • Pipe stdout to with multiple lines to individual files
  • How to remove a file called * (asterisk) without using quotations?
  • How to enable CONFIG_RT_GROUP_SCHED in Ubuntu to make it RT
  • How to make the query work in linux server?
  • Linux device driver for a gps module
  • Command for printing part of a String?
  • GitLab-Runner "listen_address not defined" error
  • How does logrotate work when there are two process use the same file?
  • Got error while Mounting, error massage:"mount.nfs: remote share not in 'host:dir' format"
  • Does read/write blocked system call put the process in TASK_UNINTERRUPTIBLE or TASK_INTERRUPTIBLE state?
  • How to create a 3 second timer in Bash?
  • Breaking out of nested function loops in Bash
  • no module named numpy even after installing it
  • How to fix error "'recipe for target "doc/automake-1.14.1' failed" while building Xenomai
  • Is it possible to partially unzip a .vcf file?
  • Sorting the time format in shell script
  • why bash changing my command 'mysql*' to 'mysql.sql'?
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com