Linked Questions

1 vote
1 answer
217 views

-Edit- This isn't a duplicate because I'm using one file to compare another everything I found on SO is looping through one file without an input file to compare. A list of filenames.csv looks like ...
chowpay's user avatar
  • 1,715
0 votes
1 answer
168 views

I currently use many heredocs in bash scripts. These heredocs contain bash variables, e.g. ${MY_VAR}, which are substituted as the script executes and the heredoc is read. Some of these heredocs have ...
fadedbee's user avatar
  • 45.2k
0 votes
1 answer
85 views

I have a list file of selected pdfs (each line contains a path to pdf). These pdfs are located in different directories which are several thousands in total. I am very new to using bash and struggling ...
Waqas Tahir's user avatar
-2 votes
1 answer
103 views

I have a below sql query. select * from table where name in ('${name}); I have a requirement to automate this as here i need to pass the string value name from txt file. The text file contains the ...
Samah's user avatar
  • 1
1 vote
0 answers
94 views

I am having an issue with for loop on centos: I am trying to convert a lot of .pst files using readpst library: the following works fine: /bin/readpst -o /destination_directory -M -S -e -D /...
Robert Wojciechowski's user avatar
0 votes
3 answers
73 views

I have a list.csv with the following content: "date";"Mr. Green Tree" "date";"Mr. Red Apple" "date";"Mr. Blue Car" I use awk + sed to get ...
citrusbytez's user avatar
0 votes
1 answer
86 views

I have a simple bash script below that outputs into a file threat info from the domain 1605158521.rsc.cdn77.org. The domain is read from B1Dossier. #!/bin/bash baseurl=https://csp.infoblox.com ...
Nina G's user avatar
  • 269
0 votes
0 answers
73 views

I am trying to automate setting up Private Key Authentication for SSH. Not sure how to achieve my desired result. I need to look stdin line by line into a file. key(){ read -p "Paste Your Private ...
unixnerd's user avatar
0 votes
2 answers
51 views

For a uni-assignment I need to write a while-loop for BASH-shell (on windows) that tries different passwords line by line from a given .txt-file and enter them to unzip a given .zip-Archive. I know ...
SoakingEggs's user avatar
0 votes
0 answers
28 views

for word in $(cat link_name.list); do echo "$word"; done The for loop does not read contents line by line but as a single line. Not sure why a while loop is preferred to do this?
Angelo's user avatar
  • 71
0 votes
0 answers
24 views

I try to print lines of a text which begin with a # I need only these lines, but not the ones with [[:whitespace:]]# $ cat text.txt # no whitespace in front of # # 3 whitespace in front of # # ...
Gjiaffaar's user avatar
0 votes
0 answers
15 views

I have the following array 4000 85.81 20 4100 70 17.5 1200 83.233 22.5 The first column shows station ID, second longitude, and third latitude. I wish to read each rows in bash pertains to say,...
Poulomi's user avatar
  • 25
306 votes
9 answers
285k views

In the following program, if I set the variable $foo to the value 1 inside the first if statement, it works in the sense that its value is remembered after the if statement. However, when I set the ...
Eric Lilja's user avatar
  • 3,653
207 votes
7 answers
258k views

I have a number of lines retrieved from a file after running the grep command as follows: var=`grep xyz abc.txt` Let’s say I got 10 lines which consists of xyz as a result. Now I need to process ...
XYZ_Linux's user avatar
  • 3,747
168 votes
9 answers
57k views

This is probably in many FAQs - instead of using: cat file | command (which is called useless use of cat), correct way supposed to be: command < file In the 2nd, "correct" way - OS does not have ...
Leonid Volnitsky's user avatar

15 30 50 per page
1
2
3 4 5
9