Skip to main content

All Questions

1 vote
2 answers
226 views

How to use output of multiple commands in last execution command while chaining commands?

I have two commands, as follows: This one gives repo names: az acr repository list -n registry -o tsv output looks like: name1 name2 ... This one gives digest codes for one repo: az acr manifest ...
Python coder's user avatar
0 votes
2 answers
49 views

Is there a way to interact with a shell but from an app or separate program?

I am trying to find a way to both receive the output of a shell and then return output, but from a different front end interface? I am trying to incorporate the Linux terminal into a potential ...
James Lindner's user avatar
1 vote
1 answer
255 views

Keep all line breaks except the last one using awk

How do I modify this line below to capture the content between two lines without the trailing line break? interesting="$(awk "NR >= $first_line && NR <= $second_line" $file_path | ...
Andrew Wei's user avatar
2 votes
4 answers
4k views

Getting only specific data based on name in text file

Let's say if my text file contains: 101 Adam 201 Clarie 502 Adam 403 Tom and i want to write a command in the shell to only give me the numbers based of a specific name. For example, only ...
Electric's user avatar
  • 123
0 votes
2 answers
93 views

One line shell command that finds all students in LEC05 and prints their first name in sorted order

For example suppose we have a file called input.txt which contains 100 John Doe LEC05 12356 132 Carol Bon LEC05 156 122 Cavar Liktik LEC01 136 ... This command should find everyone in LEC05 and ...
K Split X's user avatar
  • 1,803
1 vote
2 answers
485 views

cat file : prints prior to "user :/" prompt

file contains just 1 line: aaa when I run "cat file" it mixes to username user /dir : cat file aaauser /dir : What could be the problem ? Extra Info: perhaps this is not properly set in bashrc ? ? ...
user avatar
19 votes
1 answer
78k views

Read columns from file into separate variables

I need to read the following input into separate columns as variables? input.txt b73_chr10 w22_chr9 w22_chr7 w22_chr10 w22_chr8 w22_chr6 I have written the following command;but I guess it is ...
shome's user avatar
  • 333
6 votes
6 answers
5k views

Command line method to find repeat-word typos, with line numbers

Updated: Clarify line number requirement, some verbosity reductions From the command line, is there a way to: check a file of English text to find repeat-word typos, along with line numbers where ...
clarity123's user avatar
  • 3,579
1 vote
1 answer
3k views

Match everything after backslash and before space

I have strings similar to the following: *unknown*\*unknown* (8) hello\morning (3) I'm trying to match just morning or *unknown\*. So far I have tried: [^\\]+$ But that matches from backslash to ...
Proletariat's user avatar
6 votes
3 answers
9k views

Strip off word pattern at the end of string using sed

I have following string: ksh -x SCRIPT2.ksh $BUSSINESSDATE & PID=$!; ksh -x SCRIPT1.ksh $BUSSINESSDATE & PID=$!; I want to strip off the last word & PID=$!;. Desired result is: ksh -x ...
Sas's user avatar
  • 1,133
2 votes
2 answers
2k views

Extracting values from a file keyed by multiple keys

Consider a file with key=value pairs, and each key is optionally a concatenation of multiple keys. In other words, many keys can map to one value. The reason behind this is that each key is a ...
h.j.k.'s user avatar
  • 1,273
4 votes
2 answers
2k views

convert bulk of text files to pdf with naming based upon header file

Knowing that "How to convert from text to .pdf" is already well answered here link and here link, I am looking for something more specific: Using Claws-Mail [website] and a Plug-In [RSSyl] to read ...
erch's user avatar
  • 5,170