Questions tagged [read]

11 questions
6
votes
1 answer

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…
user3589502
  • 61
  • 1
  • 3
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
  • 89
  • 4
  • 16
  • 40
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
  • 273
  • 2
  • 9
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
  • 89
  • 4
  • 16
  • 40
0
votes
1 answer

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

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
  • 101
  • 1
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
  • 11,898
  • 35
  • 98
  • 166
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