Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash get value sended to pipe

stdin=$(cat)

echo "$stdin"
Comment

bash script get value from piped input

#!/bin/bash
if [[ -p /dev/stdin ]]
    then
    PIPE=$(cat -)
    echo "PIPE=$PIPE"
fi
echo "ARGS=$@"
Comment

PREVIOUS NEXT
Code Example
Shell :: linux ls sort by biggest file first 
Shell :: bat if command exists 
Shell :: bash color test 
Shell :: bash "wc -l" 
Shell :: cp all files except .git 
Shell :: Kubernetes cluster unreachable: Get "https://192.168.56.10:6443/version?timeout=32s": net/http: TLS handshake timeout 
Shell :: docker compose busybox image 
Shell :: disbale knopwob dunst 
Shell :: share a given window on android 
Shell :: shell randomly permute lines 
Shell :: docker ubuntu 
Shell :: sqlservr: Unable to read instance id from /var/opt/mssql/.system/instance_id: 
Shell :: create a tar with folder content only 
Shell :: commit history 
Shell :: resize all images in folder linux 
Shell :: git add everything except 
Shell :: cd in linux 
Shell :: windows cmd shortcut that always opens as administrator 
Shell :: pecl install specific version 
Shell :: bash float 
Shell :: uninstall couchbase 
Shell :: container registry permissions gcp 
Shell :: anaconda install crispy-forms 
Shell :: download pgadmin 4 ubuntu 
Shell :: alias pc ubuntu ssh 
Shell :: Remove nfs file 
Shell :: what is the use of bashrc file in linux 
Shell :: how to remove first colum froim file linux 
Shell :: Error: serverless-domain-manager: Plugin configuration is missing. 
Shell :: windows shell 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =