Skip to main content

Questions tagged [read]

`read` is a shell utility used for reading strings from the standard input stream, or from a file descriptor.

2 votes
1 answer
67 views

I have a script read.sh: read -ei "hello world" eval $REPLY Upon executing chmod +x read.sh and then running ./read.sh, I notice that pressing Esc followed by b or w jumps between the ...
luna's user avatar
  • 25
0 votes
1 answer
140 views

I have this code, which does what I want, but I don't entirely understand it: #!/usr/bin/env bash echo -ne "\033[6n" # Ask the terminal to print out the cursor's position ...
user153064's user avatar
0 votes
1 answer
145 views

Right now if I write to a name pipe and then close the reader, the writer gets a SIGPIPE and then exits. For example, $ mkfifo pipe $ cat pipe & # read from the pipe in the background $ cat > ...
Joseph Camacho's user avatar
1 vote
1 answer
116 views

I am trying to remove files from a directory by pasting their names into a while loop that will simply rm each item from the list of files given to it. $ sponge | while read file; do echo "rm $...
ychaouche's user avatar
  • 1,043
-2 votes
1 answer
807 views

little script #!/bin/sh cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 24 | head -n 4 printf 'do you like this? (y/n)? ' read answer if [ "$answer" != "${answer#[Yy]}" ] ;then ...
user447274's user avatar
0 votes
1 answer
240 views

I have a file with the following values. I am trying to read from the file and add 1096 to the last value and generate the output on screen. My original file looks like this. agile_prod_toolkit,30 ...
ranjit abraham's user avatar
0 votes
1 answer
137 views

Following works Task: List all folders that contain file of iname *AlbumArt* that also contain iname *cover*.jpg, and for each of those folder list all jpg files with size find . -type f -iname '*...
Porcupine's user avatar
  • 2,176
1 vote
1 answer
481 views

Trying to read a long input into a variable from ZSH on MacOS. echo "URL: " read URL input is always truncated to 1024 chars... if I try and type additional chars nothing happens. ...
SoonGuy's user avatar
  • 131

15 30 50 per page
1
2 3 4 5
25