Linked Questions

0 votes
1 answer
98 views

Is there a way to loop the commands until the number of names from the prompt, i dont want it to just limit the number of users but to continuisly add names to the prompt while repeating the line of ...
MOth Balls10's user avatar
63 votes
6 answers
90k views

I have this script: nmapout=`sudo nmap -sP 10.0.0.0/24` names=`echo "$nmapout" | grep "MAC" | grep -o '(.\+)'` echo "$names" now the $names variable contains strings ...
ramgorur's user avatar
  • 2,191
86 votes
4 answers
40k views

What does the triple-less-than-sign bash operator, <<<, mean, as inside the following code block? LINE="7.6.5.4" IFS=. read -a ARRAY <<< "$LINE" echo "$IFS&...
gsklee's user avatar
  • 4,954
5 votes
2 answers
5k views

I have a script that reads from /proc/stat and calculates CPU usage. There are three relevant lines in /proc/stat: cpu 1312092 24 395204 12582958 77712 456 3890 0 0 0 cpu0 617029 12 204802 8341965 ...
Michael A's user avatar
  • 4,685
2 votes
3 answers
4k views

From the line: word1 word2 word3 word4 word5 word6 How to return the following: word1 word2 word3 word4 word5 word6 word1 word2 word2 word3 word3 word4 word4 word5 word5 word6 word1 word2 word3 ...
user163125's user avatar
-1 votes
1 answer
2k views

I have a text file with 2 values in each line. I need to put these two values in two different variables i.e var and var2 and do further processing for each line. The delimiter is space between the ...
Snigdha Gayatri's user avatar
0 votes
1 answer
1k views

I'm writing a Terminal Match-Anything Pattern Rule, i.e. %::, that, as expected, will run only if no other target is matched. In its recipe I want to iterate over makefile's explicit targets and check ...
artu-hnrq's user avatar
  • 1,587
0 votes
2 answers
683 views

About split a string into an array we have two scenarios: if the string has empty spaces how a separator, according with the following post: Reading a space-delimited string into an array in Bash So ...
Manuel Jordan's user avatar
0 votes
4 answers
144 views

Ive got a file called school.test and it looks like this: David maths Sam maths Sam english Simon french Simon english I want to write a for loop which reads this ...
nrs90's user avatar
  • 168
2 votes
1 answer
119 views

On https://www.virtuability.com/public/wp/?p=12 I saw this notation: oarr=($output) export AWS_ACCESS_KEY_ID="${oarr[1]}" export AWS_SECRET_ACCESS_KEY="${oarr[3]}" export AWS_SESSION_TOKEN="${oarr[4]...
chriscatfr's user avatar
  • 2,652
0 votes
1 answer
305 views

My requirement is to iterate through checked in files in a loop and perform the action: My GitHub Actions workflow is: jobs: build: runs-on: ubuntu-latest steps: - name: checkout repo ...
Karki's user avatar
  • 7
0 votes
1 answer
145 views

So I have my CSV file which looks like that: repo_name1,path1,branch1 branch2 I read it with following code: INPUT=repos.csv OLDIFS=$IFS IFS=',' [ ! -f $INPUT ] && { echo "$INPUT file ...
cropyeee's user avatar
-2 votes
4 answers
66 views

I have a somewhat tricky BED file format, which I should convert to a classic BED format so as I can properly use it for further steps: I have this unconventional BED format: 1 12349 12398 + 1 ...
Emilio Mármol Sánchez's user avatar