Questions tagged [numbering]
The numbering tag has no usage guidance.
35
questions
0
votes
1
answer
28
views
FISH CLI What do the error numbers at the prompt mean?
I am just trying out the FISH - (the FriendlyInteractiveSHell) - CLI & whenever I type in an erroneous Command, a new Prompt appears under the faulty Command prompt with a number in square ...
0
votes
1
answer
24
views
Would it be feasible to create a script that can right click the mouse at a very specific location when an even more specific number gets generated?
I'm aware of a program that can simulate a right-click at specific coordinates on my display at any given interval.
However, I'm wondering if it's possible to write a script that can perform a right-...
0
votes
1
answer
24
views
How can numbered files be moved and renamed to subsequent numbered files to correct directory?
In ~/wrongdir there are mpv-shot0001.jpg, mpv-shot0002.jpg, mpv-shot0003.jpg, mpv-shot0004.jpg, mpv-shot0005.jpg
where the screenshot key was pressed when a mpv was initiated in ~/wrongdir.
The ...
2
votes
2
answers
103
views
How Can I Find Five Numbers Between Two Numbers
Suppose I have these two numbers: 800000 and 3200000. I want to find five numbers with an even difference in between these two numbers. Therefore, I want the output to be:
800000
1200000
1600000
...
0
votes
2
answers
237
views
match number range with non significative zeros in zsh
I have in a directory files like this :
booklet-001.pdf
booklet-002.pdf
booklet-003.pdf
…
booklet-997.pdf
booklet-998.pdf
booklet-999.pdf
Then, I whant to match the files numbered from 079 to 256. ...
1
vote
3
answers
64
views
Restarting poem line numbering any 4 lines after a blank space
This is related to very interesting answer given here: Any text utility or hack to numbering poems lines omitting certain numbers?
awk 'FNR % 4 == 0 { printf "%6i %s\n", FNR, $0 ; next }; {...
0
votes
3
answers
352
views
Change number written in scientific notation in filenames
I'm going to make a video of image files, but the filenames contain numbers in scientific notation, so the ordering of the name will not be correct.
The filenames are in this format:
ABC_1.000000E-01....
3
votes
3
answers
484
views
Numbering poems stanzas using roman numerals
I would be able to numbering, sequentially, any stanza of a certain poem using roman numerals like this:
Injurious love, why still to mar accord
Between desires has been thy ...
0
votes
2
answers
295
views
Any text utility or hack to numbering poems lines omitting certain numbers?
My goal is try to see if there are common text utilities in linux that can be used to number lines of poems like this:
OF Mans First Disobedience, and the Fruit
Of that Forbidden Tree, whose mortal ...
0
votes
3
answers
409
views
Numbering a bunch of files according to the date modified timestamp?
So I downloaded a bunch of documents in chronological order, but I have to copy and edit them, which would change the date modified. I would like to prefix them with a number (001_, 002_...) in the ...
3
votes
2
answers
350
views
Collapsing a series of comma separated numbers in a sequence to Beginning-End [duplicate]
Problem I am trying to solve/enhance a BASH script that provides a number sequence:
I am using a topologically aware tool (lstopo-no-graphics) to extract physical processor numbers to use for input to ...
1
vote
1
answer
246
views
How to show a line number in bash TUI?
I'm trying to add support for line number on a bash project i like (mainly as a fun exercise).
To start, i looked into the function that was setting up the status line (since i thought of inspiring ...
-1
votes
1
answer
69
views
Count occurrences with a BEGIN/END statement
I have a list of numbers:
2
1
3
2
2
2
1
First I had a filelog. I extracted all the ID. Now, how do I count the occurrences of each number and display it like this?
(the first one is the number, the ...
0
votes
2
answers
77
views
Placing matching occurrence number to the left side of the occurrence itself
I have a file with multiple occurrences of the expression ".mp3". I want the first occurrence to become "1.mp3", the second occurrence to become "2.mp3", and so on.
It would be something like awk '/ ...
-1
votes
1
answer
70
views
Bash: I have a variable in bash script; [duplicate]
I have a variable in bash script dirs= "4"; I want to get this number from another file so I am using a command dirs= sed -n '1p' < test.txt; It gets me the number, I see it in the terminal. But ...
-1
votes
2
answers
104
views
Wish to add numbers to word/url
What i want;
as of example- Youtube.com/1
i wish to have an automated script that counts up to a 1000
URL EXAMPLE:
https://www.youtube.com/1
https://www.youtube.com/2
Edit: ---
[Fetching ...
1
vote
4
answers
236
views
How to replace & generate line number
I have an input file with below data, how can I convert it to below mentioned output file.
Input file
00001abc
00002def
00003ghi
00001jkl
00002mno
00003pqr
00001stu
00002vwx
00003yza
00004bcd
...
-3
votes
2
answers
65
views
Use first available number from a file
I have a config file prosody.config
With the following data:
VirtualHost "pubsub.subdomain.domain.com"
admins = { "node1.subdomain.domain.com", "node2.subdomain.domain.com" }
...
1
vote
2
answers
233
views
Number files based on modification time
I have a set of files that I need to rename based on the creation time, by appending two digits to the beginning indicating the sequence.
Say, I have the following files:
Filename Creation ...
-2
votes
2
answers
547
views
number lines in a file
So I have a file text.txt with lines of some characters
example:
abc
abc
yxz
abc
now I would like to number the lines like this and copy it to another file.
End expected result:
1 abc
2 abc ...
1
vote
1
answer
649
views
nl - numbering input in descending order
Is this possible to number file lines in descending order?
That would be something like:
nl -i -1
unfortunately this gives me:
nl: invalid line number increment: ‘-1’: Numerical result out of ...
5
votes
1
answer
4k
views
How to number paragraphs
I know I have already asked this question, but I didn't get an answer that worked. So please could someone answer my question?
I have a text file, containing paragraphs of text, each separated by a ...
0
votes
2
answers
191
views
mv files into folders based on numbering in names
I have 30 folders:
s-01
s-02
...
s-30
And, I have 30 files:
txtFile-001
txtFile-002
...
txtFile-030
How can I perform the following operation in one shot
mv txtFile-001 s-01/txtFile
mv txtFile-...
3
votes
3
answers
785
views
Override page numbers of a djvu document
I have a djvu scan of a book. Let's consider two cases:
I'd like to number the pages 0, 1, 2, ... (usage case: the cover should get be page 0)
I'd like to number some pages with Roman numbers and ...
0
votes
1
answer
1k
views
Increment Numbers in URL?
I want to create a list of URLs. The URLs have two sets of identical numbers which need to be incremented by 1:
http://sample.com/poilus/cwrgshs/192/192.html
http://sample.com/poilus/cwrgshs/193/193....
4
votes
1
answer
2k
views
sed: append line and number output
In Linux, say one wants to add the following line before line number five (thus line nuber 5 becomes line number 6) and wants to have all the lines in the output numbered throught the sed 'tool' =
...
5
votes
3
answers
1k
views
Delta of numbers in file
On our server a cronjob has logged a count of files in a shared directory. The log is of the form:
2003-07-03T16:05 279
2003-07-03T16:10 283
2003-07-03T16:15 282
By now this file has far over a ...
2
votes
3
answers
7k
views
Extract line number of a file which is having a non zero value before a specified string
I'm having a file which contains following data
1. verification: 10 passed 0 failed
2. verification: 10 passed 0 failed
3. verification: 10 passed 1 failed
4. verification: 10 passed 3 failed
5. ...
16
votes
3
answers
20k
views
Are the major, minor number unique
Are the major, minor number Unique?
Do we have any citations and reference to it?
NAME MAJ:MIN RM SIZE RO MOUNTPOINT
sda 8:0 0 465.8G 0
├─sda1 8:1 0 298.2M 0
├─sda2 8:2 0 ...
8
votes
3
answers
30k
views
ffmpeg -pattern_type glob -- not loading files in correct order
I have a dilemma..
I've had a script for a while now that downloads pictures from a webcam every few minutes.
The naming convention just does new_image((len(files(dir))+1) + '.jpg') and that's all ...
0
votes
1
answer
109
views
emacs line wrapping and numbering
How can I tell emacs to wrap lines at the 80th character?
I am looking for a solution I can put in /.emacs.
I put this in /.emacs but it doesn't work.
;; ========== Enable Line Numbering ========== ...
3
votes
3
answers
587
views
swapping fields in columns by fixed pattern (yes, no, no, yes)
I want to produce a following list of pages (for imposition work); (number of pages is variable, but I make a sample of my needs using a list of 16 pages, logic is the same for longer lists)
1,16
8,9
...
2
votes
3
answers
433
views
repeat twice each couple of strings in a for cycle
I need to pass to pdftk, a list of arguments constituted by strings repeated twice like:
A1-2 B1-2 A3-4 B3-4 A5-6 B5-6... and so on...
I managed to achieve this with this workaround
for ((x=1, y=2;...
213
votes
11
answers
175k
views
List files sorted numerically
I have a bunch of files from log1 to log164.
I'm trying to LIST the directory (sorted) in a UNIX terminal but the sort functions are only providing the format like this:
home:logs Home$ ls -1 | sort
...
3
votes
6
answers
2k
views
Add consecutive numbers succintly and elegantly to index lines
I usually do this
$ wc questions
33 36 3105 questions
$ seq 1 33 > nums
$ paste nums questions
1 Content
2 ...
.
.
33 End Content
but I feel there could be faster way to do ...