Questions tagged [gnu]

GNU Project is a free software, mass collaboration project. The founding goal of the project was, in the words of its initial announcement, to develop "a sufficient body of free software [...] to get along without any software that is not free.

Filter by
Sorted by
Tagged with
0 votes
2 answers
41 views

sed or other equivalent for grep with vfF

RHEL6.10 , gnu grep 2.2 grep -vfF stem.txt source.txt > filteredoutput.txt stem.txt has unique 13 digit numbers. source.txt is fixed length (400) data file where the 13 digit field value starts at ...
user avatar
  • 103
1 vote
1 answer
59 views

How to get the matched expression in GNU Recutils?

In the GNU Recutils manual, it is written that The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to sub-expressions within ...
user avatar
  • 71
0 votes
1 answer
14 views

How to escape an apostrophe in recsel?

Let's consider the following recfile Name: John Text: It's me! Name: Jane Text: Hello The following command works perfectly to select the second record recsel -e "Text = 'Hello'" test.rec ...
user avatar
  • 71
-1 votes
1 answer
48 views

How do I change the command of delete key of nemo file manager?

I use debian with cinnamon (desktop environment). If I want to delete file on nemo file manager I have to select file with mouse then I have to press delete key to delete file. I would like to change ...
user avatar
2 votes
4 answers
243 views

cmp command return value?

I am using the cmp command on Ubuntu and I would like some clarification on its return value. The manual ($ man cmp) says nothing about the return value, but suggests looking into the GNU ...
user avatar
  • 264
20 votes
3 answers
3k views

Why should I care about POSIX if I'm writing bash scripts? [closed]

Looking for suggestions/edits I can make to this question to get it reopened. A lot of these answers seem objective to me and they are the type of answers I'm looking for. I've read four articles ...
user avatar
1 vote
2 answers
580 views

ls -d command only returns `.` eg, and no child directories

I have standard ls installed, I also have lsd installed, which is a nerd-font drop-in replacement for ls. I mention this because the error may have something to do with the alias. For testing right ...
user avatar
  • 27
1 vote
1 answer
25 views

Why do I need to specify `-o auto` for join's `-e` option to work?

With the following two simple files: a.txt 1 a 2 b 5 c b.txt 2 x 4 y 5 z The following command does not behave like expected: $ join -a 1 -a 2 -e 0 a.txt b.txt 1 a 2 b x 4 y 5 c z I would expect ...
user avatar
  • 2,281
7 votes
1 answer
441 views

Why does "find -delete" imply "-depth"?

The man page for GNU find clearly warns that using -delete implies -depth. However, I cannot find any explanation for this requirement: -delete Delete files; true if removal succeeded. If the ...
user avatar
  • 88.9k
1 vote
2 answers
102 views

Understanding how GNU sed range addresses work

I am reading about range addresses in GNU sed. But I don't understand how does that exactly work, I have tried to run sed --debug but the output is too verbose to understand. Let's assume that I have ...
user avatar
3 votes
4 answers
318 views

Using GNU sed to extract header names between two pattern lines possibly separated by blank lines

I have the following file: ------ Introduction ---------- Optio eum enim ut. Et quia molestias eos. Doloribus laborum quia quae. Magnam cupiditate quis consectetur. ----- Chapter1: Foo ----- Odit ...
user avatar
0 votes
1 answer
50 views

How to change the pager for info command

On GNU/Linux is it possible to change the default pager for info command? I would like to use less as the pager (similar to man pages). I have customized less to use colors to make navigation of man ...
user avatar
0 votes
1 answer
367 views

Is there a defragmentation utility for ExFAT available in GNU/Linux world?

I came across a SSD which have a very significant performance drop (about 20 times). As there is an ExFAT filesystem used, I suspect it might be due to fragmentation. Is there a tool available in the ...
user avatar
  • 809
0 votes
0 answers
19 views

GNU screen append buffer multiple times without exiting copy-mode

Is there any way to append copy buffer multiple times without exiting copy-mode in GNU screen? With the functionality I'm looking for I would be able to enter copy mode, scroll to the desired area ...
user avatar
0 votes
1 answer
135 views

Enable GNU Fortran 7.xy on CentOS 7.9: scl command not found

I'm trying to enable GNU Fortran ver 7.xy on a CentOS 7.9 image in a Singularity container. According to various sources on the internet I need to install the following packages with yum: yum install ...
user avatar
  • 431
-1 votes
1 answer
1k views

sed bad flag in substitute command: 'n' [duplicate]

When I run this command for file in $sourceDir do sed -i s/$origText/$newText/g $file done it gives me this error: bad flag in substitute command: 'n'
user avatar
0 votes
0 answers
56 views

Debian rebooting into GNU GRUB automatically

I am running Debian 9 with LinuxCNC 2.9. After starting the PC i get into GNU GRUB and let it start Debian automatically. It reboots and ends up right there again. After some reboots (not always the ...
user avatar
  • 1
0 votes
0 answers
24 views

GNU MPFR not found

I am running autotools and then ./configure, but this line in configure.ac isn't able to find GNU MPFR despite being installed: AC_CHECK_LIB(mpfr, mpfr_init2, [gnumpfr_present=yes], [AC_MSG_WARN([...
user avatar
  • 1
0 votes
0 answers
16 views

How do I dump text from the GNU info reader?

I would like to dump the text from a page of a tool's info documentation to a text file and read and edit it subsequently in Vim. Does the GNU info reader permit dumping of its text, or is there an ...
user avatar
0 votes
1 answer
56 views

Marking multiple lines in ed

I've opened ed and inserted the following text: This text Is a Test However, when I attempt to mark lines 1-3 using the following command: 1,3ki And print them with 'ip It only prints the last ...
user avatar
-2 votes
1 answer
107 views

Why all versions of Android until now contains almost no GNU softwares?

A GNU/Linux OS contain almost all GNU software (nano, tar, bash, make, etc.). But how does Android? It even does not have a terminal by default for mobile. Google has replaced most of them by non-free ...
user avatar
8 votes
2 answers
540 views

Print contents of a file only after last occurrence of a token?

I have long-running programs that can restart their internal state. I want to see the log file entries only for the most recent state (to load into vim's quickfix). How can I show all lines after the ...
user avatar
  • 201
0 votes
1 answer
46 views

What encryption algorithm does GNU recutils use?

Recutils offers a way to encrypt specified fields in a record, whilst leaving the rest in clear text. -- GNU Recutils Manual What encryption algorithm does it use by default?
user avatar
  • 71
0 votes
1 answer
152 views

How would I go about compiling GNUzilla/Icecat from source in support for my specific ARM CPU?

I recently picked up the Pine H64 which has the Allwinner “H6” Quad-Core ARM Cortex A53 64-Bit Processor. How would I go about compiling Icecat in support for this on Manjaro ARM?
user avatar
0 votes
0 answers
51 views

Getting so libs strings and sort in GNU/Linux bash

i am trying to get in order the strings from the system base libraries First the commands i use for this : «reset» is a command for clean the screen «strings is a command for gather information from /...
user avatar
  • 29
2 votes
2 answers
496 views

Mapfile not removing trailing newline

Sample Data: Tab separated tsv file a.1.58 fadado/CSV https://github.com/fadado/CSV a.1.63 jehiah/json2csv https://github.com/jehiah/json2csv a.1.80 stedolan/jq https://github.com/stedolan/jq/...
user avatar
  • 1,362
2 votes
1 answer
166 views

How to use the shred command the right way?

I got to know about shred yesterday. I want to know the proper way of removing files with it. Should I first shred the file and then use rm to remove it? $shred <file> $rm <file> Or ...
user avatar
1 vote
0 answers
29 views

Stripping and Renaming parent directory for each line output in tar -T -? [duplicate]

I have an list of directory output from the following command that I want to tar: find ./temp -type f -name '*' ./temp/main/randomfile.txt ./temp/main/dir_a/random.txt ./temp/main/dir_b/random.txt ./...
user avatar
4 votes
1 answer
241 views

How does cmp -l show differences?

I'm using cmp (GNU diffutils) 3.7 and I'm confused by the output of cmp -l/--verbose ("output byte numbers and differing byte values"). I have two files that are almost identical except for ...
user avatar
  • 333
3 votes
4 answers
172 views

Regex match shell variable as a pattern (case insensitively)

A snippet of a typical tsv file I have used 10 Interstellar Main Theme Extended UDVtMYqUAyw 11 Journey XvG78AmBLc4 12 Jurassic Park Music & Ambience Amazing Soundscapes and Music ...
user avatar
  • 1,362
0 votes
2 answers
53 views

Are dynamic linkers interchangeable?

Are dynamic linkers interchangeable? Let's say I compile a program, for example with gcc, linking in various dynamic libraries, with the program to be used at runtime with the gnu linker for resolving ...
user avatar
  • 113
0 votes
5 answers
1k views

Grep and Cut command in linux

I have a csv file with loads of data. I wish to cut the 9th column for values >=1 and then use grep to display full rows that match. Sample format: ABC,XYZ,RTY,CREAM,FRANCE,170019,ST REMY CREME,...
user avatar
-2 votes
3 answers
178 views

Why Ubuntu is considered as GNU/Linux?

I am wondering why Ubuntu is being called distro of "GNU/Linux" even though it offers proprietary graphic drivers (and some other things) which are not part of GNU GPL license.
user avatar
  • 11
2 votes
3 answers
310 views

Match curly brace with new line

Trying to match a string + line break + left curly brace using sed. sub feature_get_web_php_mode { my ($d) = @_; my $server = &find_domain_server($d); to become this sub feature_get_web_php_mode {...
user avatar
0 votes
1 answer
77 views

mktemp creates file in pwd rather than in /tmp

Previously mktemp used to create files in /tmp. Today I noticed that mktemp is creating file in $PWD rather than in /tmp? Did I change something inadvertently? Any suggestions to fix this? Note: I ...
user avatar
  • 1,362
-1 votes
1 answer
221 views

Delete all files older than X days and all empty folder (linux/bash)

I am deleting all files recursively with: $ find . -type f -name "*.*" -daystart -mtime +100 -exec rm -rf {} \; Followed by all empty folders with: $ find . -type d -empty -delete since I ...
user avatar
  • 871
2 votes
1 answer
203 views

Why does `grep -L x <<<x >/dev/null` return 0 despite that `grep -L x <<<x` returns 1?

I have GNU grep 3.3-1 (the current version in Debian Buster). From man grep: EXIT STATUS Normally the exit status is 0 if a line is selected, 1 if no lines were selected, and 2 if an error ...
user avatar
0 votes
1 answer
54 views

Gimp: Cut And Paste Rectangle on New Layer

I have an image open. I then made a rectangle. I then cut out the rectangle. I then created a New Layer called loveLanguage. I am now trying to paste the contents of the cut-rectangle it onto this ...
user avatar
12 votes
3 answers
1k views

Why does the `-` (minus) interpretation of GNU date differs from the intuitive one, when a date is specified?

If I subtract a time amount from the current date, GNU date works intuitively: date '+%F %R'; date '+%F %R' --date='- 1 hour' 2021-04-19 15:35 2021-04-19 14:35 However, when I use a date as operand, ...
user avatar
  • 778
0 votes
1 answer
25 views

Replacig text inside multiple repeating patterns in same line

I have something like this; I like reading **books** and taking **notes** I was trying to get something like this; I like reading <b>books</b> and taking <b>notes</b> Tried ...
user avatar
  • 244
0 votes
2 answers
187 views

How to download 1.4.13 version of gnupg in linux server?

Maybe this problem is not good, but I have tried it for two days. Still no success. I want to download the 1.4.13 version of gnupg, but I found that the various websites of gnupg are not accessible. I ...
user avatar
  • 173
3 votes
1 answer
193 views

Use of dpkg --print-architecture to control build in a makefile

I am trying to figure out some work around to use dpkg --print-architecture in a Makefile. No responses to my previous query on gnustep, so I'll try again with my last failed work around. From ...
user avatar
0 votes
1 answer
44 views

Specific sed command understanding

Hey I've been having struggles trying to decipher what a specific sed command would do despite my research I seem to be stumped. sed -E 's/([0-9]+)-([0-9]+)/\2:\1/g'
user avatar
  • 1
0 votes
0 answers
46 views

Move or copy selective files, while recreating directory structure

I'm looking for a command or commandline that can take a list of files of a subtree (via a pipe, etc.) and copy/move them to a new destination, while recreating the source directory structure. It ...
user avatar
  • 101
-1 votes
5 answers
388 views

Sed delete empty lines after a particular line number [duplicate]

I am trying to delete all empty lines after line number 3, till the end of the file: cat ${File} 1 2 3 4 5 5 6 7 8 9 sed -e '3,${s~^$~~g}' ${File} 1 2 3 4 5 5 6 7 8 9 Observation: No ...
user avatar
  • 1,362
1 vote
1 answer
377 views

What is %z useful for in GNU date?

I'm in the UK running these 2 commands (using gdate as I'm on a Mac with date (GNU coreutils) 8.32 installed): # A UK winter date, timezone in UK at this time is GMT = UTC $ gdate '--date=TZ="...
user avatar
  • 551
0 votes
1 answer
211 views

POSIX alternative to GNU find's -print0

GNU find has a -print0 option to terminate filenames with null characters. However, this option is not available in POSIX find. In the GNU man page for find, under the -print flag, it says: If you ...
user avatar
0 votes
1 answer
548 views

How to grep on files less than a size and limit to extension [duplicate]

I want to recursively grep on all files in subdirectories with extension csv but select only those files that are less than 4M in size. Is this correct way to do? find . -type f -size -4M | grep --...
user avatar
  • 237
1 vote
1 answer
39 views

Why does gnu `sort` ignore non-alpha charectars?

I was expecting @'s to be sorted together, but they interleaved with the non-@ versions. Does sort have an option for ASCII sorting? I didn't see something obvious in the man page. $ echo '@x > @...
user avatar
  • 123
1 vote
1 answer
216 views

grep flag to NOT ignore case

I have a simple script to search patterns in my code sources, named prgrep #!/usr/bin/bash grep -irnI --exclude-dir={.git,obj} --exclude=tags --color=auto "$@" (The fact that it is a script ...
user avatar
  • 311

1
2 3 4 5
8