Questions tagged [text-processing]
Manipulation or examining of text by programs, scripts, etc.
8,540 questions
-1
votes
0
answers
17
views
ZPL code, 2 lines [closed]
Can someone show me the code to generate "FEFCO" on line 1 and "0410" on line 2 directly underneath, in ZPL? I'm trying to create a file to send to my printer for box on demand
-4
votes
0
answers
31
views
trying to print text in pod files
I need to know how to generate 2 lines in a pod file. I don't know anything about code. All I need to make is 1 word with four numbers directly underneath. I'm running a BOD and trying to generate ...
3
votes
5
answers
351
views
Replace the matching pattern with equal number of n characters
I need to replace numbers separated with slashes. Using regex word boundaries search won't do, because there are other number strings which has other word boundry than slash.
Here's what I've got now ...
1
vote
1
answer
134
views
`watch` with multiple columns
I have a 320x83 terminal window, and would like to use watch to run a command repeatedly and monitor the output. The command output is less than 80 characters wide normally, so I could fit four "...
9
votes
1
answer
796
views
Why does this column command keep generating spaces indefinitely when piped to a file, but works fine when not piped?
The input data is:
1 2 3 4 5 6 7 8 9
dataX 1111 111111 111111 111111 111111 111111111111111 11111111111111111 11111111111111
The command that works fine is:
column --table --table-right 9 < input....
1
vote
2
answers
250
views
Adding leading zeros to output of 'seq' on the 'bash' comand-line
How can I add leading zeros to the output of seq?
seq 1 5
1
2
3
4
5
so it prints:
seq 1 5
01
02
03
04
05
In the man page it says printf formatting can be used:
I tried: seq -f %0g 1 24
-f = --format
....
2
votes
6
answers
189
views
How to get infos about the route of tor to the internet and format the output
I am looking for a way to show some details about the connection of my tor route to the internet and format them to a specific output in the terminal, on Linux.
I found this way:
curl -s --proxy ...
0
votes
3
answers
150
views
Command line tools for converting a 1-bit bitmap into hex data?
I'm trying to encode simple 1-bit graphics for a Z80-based game system. Here's an example:
Ideally, I want to convert bitmaps like this into a text file containing an array of hexadecimal data that ...
5
votes
4
answers
475
views
awk not flipping columns properly, alway 1st column preceeds
I have the following file below,
$ cat voltages.txt
"-0.20"
"-0.10"
"-0.00"
"-0.10"
"-0.20"
"-0.30"
"-0.40"
"-0.50"
&...
5
votes
6
answers
465
views
Need csvuniq functionality on the command line for CSV with embedded end of line
I need to deduplicate a large CSV file. Turn out I cannot simply use LC_ALL=C sort -u to sort and remove the duplicates lines since my CSV is using double quotes and embedded end-of-line in value.
I ...
4
votes
2
answers
1k
views
jq - combine JSON objects with their arrays without duplicating or removing existing
I'm trying to combine the arrays of two JSON files I need to achieve this by combining the arrays without removing existing values of arrays and without removing any object. Sorting output arrays ...
4
votes
4
answers
521
views
How to count the number of multi-valued attributes in an LDAP entry... or lines in a paragraph, where diff paragraphs have different numbers of lines?
I'm trying to figure out a way of counting how many attribute values (for a multi-valued attribute in LDAP) various different users have. For example, the data looks something like this...
dn: uid=...
14
votes
1
answer
891
views
Why is "cmd | xargs" to join lines of cmd with spaces wrong
We often (1, 2, 3, 4...) see code such as:
cmd | xargs
or even:
cmd2 $(cmd | xargs)
In an attempt to join the lines of cmd with spaces (and in the second case so as to construct a command line for ...
0
votes
4
answers
193
views
GREP Date Format from String
I'm trying to write up a script to interact with the log files of Postgres. I have a query to get the filename of the log files.
sudo -u postgres psql -tc "SELECT setting FROM pg_settings WHERE ...
1
vote
3
answers
208
views
find awk grep - search and replace & passing modified contents to awk to overwrite the existing file
I have a folder with many subfolders full of various Quarto(reg) files & in those files there are links that are located in varying positions in the file lines.
UPDATE ON 3 November 2025 in ...