All Questions
27 questions
0
votes
1
answer
67
views
view a bunch of text files in the terminal [duplicate]
I've got a bunch of text files and pdfs in a directory.
If I enter
evince *.pdf
..all the pdfs open up in separate windows, I do this quite often.
When I enter
cat *.txt
..was pleasantly surprised ...
1
vote
1
answer
2k
views
mate-terminal showing unwanted text when it starts
i'am on parrot OS, after a forced restart my mate-terminal begun showing text from bashrc every time it started, after a "clear" it goes away and the prompt is properly colored and ...
0
votes
5
answers
638
views
In bash how to copy an URL within a displayed text file without using the mouse?
Let me take you to this short trip:
Open terminal.
Type
cat <any text file in your current working directory, containing a URL, at the beginning> | head
The first 10 lines of that text file are ...
0
votes
2
answers
605
views
Extract fields from JSON document embedded in text file
I have the following line of text, and I would need to extract a few of the fields from the JSON part of the line of text.
June 27th 1997, 10:11:52.621 {"serviceId":"00034","...
1
vote
2
answers
779
views
How to store .txt file data in different columns of a CSV file using BASH?
I have a .txt file with the following data structure:
Scan Times:
33.3 seconds
77.4 seconds
33.3 seconds
77.4 seconds
Check Times:
110.30 seconds
72.99 seconds
72.16 seconds
110.30 seconds
...
2
votes
3
answers
2k
views
How to append the begining of a file with text from STDIN
I'm working to debug some kind of issue with the Nix Linux installer script on Debian-based OSs
Like what was said here, this snippet of the /etc/bash.bashrc:
# If not running interactively, don't do ...
0
votes
2
answers
144
views
How to change columns, drop inverted commas and add tabulation to a text file with bash
I'm quite new into bash and awk in bash scripting and from this text that I have in a file:
"Index", "Year", "Age", "Name", "Movie"
1, 1928, 44, "...
-1
votes
2
answers
420
views
Remove certain pattern in text file
I've got a text file of the form
id="111"ABC
id="222"DEF
id="333"GHJ
where the count of numbers within "" varies as well as the numbers vary. Furthermore, ABC, ...
0
votes
1
answer
1k
views
How to convert all text files in directory to one csv
I want to convert all text files in a directory to one csv file. I want the input to the csv to be the text in the text file labeled by the author of the text file found in the filename. For reference,...
-1
votes
4
answers
82k
views
How to open a text file from terminal? [closed]
I am new to linux and I have a quick question for opening text files using my terminal.
I tried many times to open a text file using commands such as
xdg-open <location>
./filename
and none ...
0
votes
1
answer
66
views
Append .txt file by cat inside the last exisiting line of another .txt file
I have a .txt file which I cat into another .txt file.
The last line of the original file (final.txt) ends with "lats =" and then by applying cat, the numbers below "lats =" are added, as shown ...
0
votes
3
answers
147
views
Delete last x-number of lines in txt file if it contains characters, in bash
I have a list of .txt files in a folder and I would like to delete the last 50 lines (whole lines) IF they contain letter characters. So far I have the following:
for i in *.txt
do max_line=$(cat ${i%...
-3
votes
3
answers
100
views
discard lines containing specific characters [duplicate]
How can I delete the lines from a file containing the character 'H'?
The file contains the following column:
H1
N1
H2
C1
H3
H4
C2
H5
H6
N2
H7
C3
H8
H9
C4
H10
H11
N3
H12
C5
H13
H14
C6
H15
H16
Desired ...
-1
votes
1
answer
68
views
Grab last youtube video index and re-download .description
after I had download youtube videos with youtube-dl -cit -f 140 ' , I forget to download the .description as well... so I have bunch of files without description, I want to redownload the description ...
0
votes
1
answer
605
views
How to make "incremental" replace in files with bash
I need to search files in directory with specific pattern (for example foobar) and replace them with foobarXXX, where XXX is a number. For example, there were two original file
snt130.txt
My ...