Skip to main content

Questions tagged [text-formatting]

Questions about using command-line utilities such as awk, sed, perl, pr, etc. to format text files. For printf format strings, use the [printf] tag. For date format strings, [date]. See also the [text-processing] tag.

0 votes
0 answers
22 views

is a cell boldface

I'm looking for a function to determine if a cell is formatted bold. I'm using LibreOffice Calc, and for ease of use, I have a range of items to buy and their prices. I want to have a simple method of ...
Michael Gehrke's user avatar
2 votes
1 answer
128 views

Cannot open an .mbox file with neomutt (although it works with mutt)

Cannot open an .mbox file with mutt I want to open a 10GB .mbox file that I downloaded from my gmail account. When I use the command neomutt -f 10GB_mboxfile.mbox neomutt takes 10-20 seconds to open ...
ecjb's user avatar
  • 445
0 votes
0 answers
31 views

Different format in .mbox and email saved locally with mutt: convert split .mbox file into the same format as mutt?

I am trying to move to mutt for mail client and am trying to have email localy. I have 2 sources of saved email: the first one was obtained from the .mbox file form google: I wrote a script which ...
ecjb's user avatar
  • 445
0 votes
1 answer
58 views

How do I change the date/time format in syslog-ng from `mmm [d]d hh:mm:ss` to `yyyy-mm-dd hh:mm:ss`?

I noticed that the default datetime format for logs in /var/log/messages is mmm [d]d hh:mm:ss, for example: Jan 4 03:46:50 1.2.3.4 ntpclient[6952]: Failed resolving address to hostname pool.ntp.org: ...
skeetastax's user avatar
0 votes
0 answers
71 views

Text processing grep and awk together on live script not working

I am using ssh to login to a remote server (Ubuntu), and then issue a command which outputs text/value each sec (live script). In the live output, I want to filter out the lines containing '...
SAM's user avatar
  • 1
0 votes
2 answers
42 views

process a text file to modify a column value based on maximum value from another column

I have a file that i am looking to modify. There are 100's of files having the same issue. the input file is below sample1 100A total 1 1000 sample2 100A total 1 5584 sample3 100A ...
bioiinffun's user avatar
1 vote
2 answers
81 views

Reformat text to exact width [duplicate]

On Ubuntu, how to reformat text to fit width (except final line), adding spaces where necessary? The closest I can get is with fmt --width=64, but this does not add the spaces between words. Input ...
FromTheStackAndBack's user avatar
1 vote
1 answer
28 views

How do I format the output of cut to the following format? [duplicate]

last part of the command: | cut -d' ' -f3 output: 4 10 required format: 4,10 I'm guessing echo (and sort?) is to be used in some way, but I can't quite place my finger on it.
kesarling's user avatar
  • 159
2 votes
1 answer
47 views

text formatter that supports bullets

I am looking for a formatter to use with my git commits. par pretty much does what I want, with the (important) limitation that I can't get it to properly format bullet lists, which are pretty common ...
m000's user avatar
  • 181
0 votes
0 answers
92 views

Find and replace in CudaText editor

So I have dump from U-boot and I need to replace specific string in CudaText editor. Here is mine text e101b1e0: 30ef27d8 e792f415 9beea618 5c601de4 .'.0..........`\ e101b1f0: aeaf9d25 e1dd63e9 ...
Slobodan Vidovic's user avatar
-2 votes
1 answer
224 views

Template for formatting output as a dynamic table in bash

I have a created a simple script which is using the ps aux command to give information for a process entered by a user, and presents the output in a table like format (something like the mysql shell ...
October's user avatar
  • 11
2 votes
0 answers
40 views

Generate upper-case in a udev rule?

I have a use case with cross-platform context which makes me want to generate symlinks under a /dev/disk/by-X directory that have an uppercase version of data returned by blkid. Is there a built-in ...
RJVB's user avatar
  • 254
1 vote
1 answer
63 views

Sed - replace a string with a character of another line

I am trying to write a script to reformat some text. pages: page1: gui-rows: 6 items: '6': material: CAT_SPAWN_EGG buy: 999999999 sell: -1 '7': ...
Pegoku's user avatar
  • 11
3 votes
5 answers
748 views

How can I reformat blocks of data until the end of the file is reached?

I have a file that looks like this: # Time-averaged data for fix avetimeall # TimeStep Number-of-rows # Row c_gyrationchunkall 1000 3 1 2.09024e-14 2 4.88628 3 5.69321 2000 3 1 2.10518e-14 2 8.33702 3 ...
Felipe Evaristo's user avatar
1 vote
1 answer
85 views

How to preprocess output of any CLI Tool in realtime?

For context, what I am trying to do is add a preprocessor to a REPL, more specifically, nix repl. Although this would probably apply to any other REPL like application. The reason for it is that I ...
Mathias Sven's user avatar

15 30 50 per page
1
2 3 4 5
41