Questions tagged [read]

14 questions
6
votes
3 answers

read in Bash and ZSH

I'm observing differences between zsh and bash when using read on macOS. With bash this script echo "characters" | while IFS= read -d '' -n 1 a; do printf %s "$a-"; done Produces c-h-a-r-a-c-t-e-r-s- Whereas on zsh I have no output and no…
2
votes
1 answer

High read error rate for a Seagate 14TB HDD, is this normal range?

This is a new HDD, but it looks like the read error rate is too high. It is higher than the threshold, but not sure if this a normal for a new HDD. Should I request for a replacement?
notilas
  • 123
1
vote
1 answer

Reading Maildir files

How can I locally open a read-only Maildir backup archive in Windows in order to browse through e-mails, run keyword searches, filter/sort by date or recipient, extract attachments, display e-mails chronologically vs. as conversations etc.? Here is…
1
vote
3 answers

Using read -r within in-line shell scripting

I have a file that contains a list of absolute paths of several files. I need to move all of the files listed in the file to another directory. Unfortunately, I have to do this using in-line shell scripting (i.e. sh -c), and I have no power over…
1
vote
1 answer

How do I print a newline after there user enters a password with zshbuiltin read command

I want to read a user's password securely within the execution of a curl command. A made a basic proof of concept which mostly works, but the output of the echo command is coming on the same line as the "Password" prompt and I am trying to find a…
1
vote
1 answer

Why is this Bash command output different from what is expected when I run the command in Debian?

The bash version in my system’s running version of Debian is: bash --version|awk 'NR==1' GNU bash, version 5.1.4(1)-release (x86_64-pc-linux-gnu) In Eyal Levin's answer on this other Stack Overflow thread it recommends this: Example: $ echo…
showkey
  • 291
1
vote
0 answers

Export fileserver permissions for folders and subfolders with read and write permissions in PowerShell ISE

Okay so I want to have the read and write permissions for users on a fileserver to be exported in CSV format. With the script below am not getting all of the subfolders on Powershell ISE Can someone help to add some code, the content in folders is…
1
vote
0 answers

Bash: read from socket file descriptor returns always the same data instead of blocking

I have a postgres started like this: exec 3< <(su -l postgres -c "/usr/local/pgsql/bin/postmaster -p '$port' -d 3 -D '$backupDir' 2>&1 & echo \$!") This redirects all logs to the socket filedescriptor 3 postgres postgres 64 Mar 19 16:32 3 ->…
Torge
  • 303
1
vote
2 answers

How to read files name last character and and rename them by running a batch file

I have 3 files in a folder which are: XXX_a.txt XXX_b.txt XXX_c.txt The filename can be varied, only the last character of the 3 files a, b and c are not changed I need to rename the files as below: XXX_a.txt to first.log XXX_b.txt to…
newbie
  • 13
  • 3
1
vote
2 answers

Why man read don't contain any argument description in my debian?

As far as i know that read in bash contains many argument such as -a -d -e -r. The webpage list all arguments of read. read's arguments In my console, man read contains no argument on it. I upload man read > read.txt into dropbox,please download it…
showkey
  • 291
0
votes
1 answer

Speed up reading a large number of files (random read)

I'm trying to run a bash script on all the xml files inside a folder. After some effort I found the likely bottleneck is reading the files, given the filenames. My script is likely running fast enough for CPU to not be the bottleneck. Here's the…
0
votes
1 answer

How to disable 'Save As' option and prohibiting file saving in Adobe Acrobat?

I'm seeking guidance on how to implement restrictions in Adobe Acrobat for a PDF document. I have password-protected the file, but I'm looking to further restrict users from accessing the 'Save As' option and also prevent them from saving the opened…
0
votes
2 answers

Using read to capture multiple variables from a command's output

I have a youtube-dl command that when run outputs two new lines, and I'm trying to capture each of those to variables. Here is what I have so far, but for some reason I can't understand, it only captures the first line of output while discarding the…
Hashim Aziz
  • 13,835
0
votes
1 answer

Where do I find whether I did or did not send an Outlook read receipt?

In Outlook (Office 365, desktop app) I sometimes receive an email with a read receipt request. My Outlook settings are such that Outlook always asks me if I want to answer that request. Sometimes I click Yes, sometimes I click No. Now I want to see…
James
  • 1