Questions tagged [pipe]

156 questions
0
votes
1 answer

How to display results without two first lines

When I run some bash command it returns 2 .. n lines of text (n is different each time, may contain blank lines). How to filter the output to display the result skipping lines 1 and 2? e.g. $ my_command file1 file2 file3 file3 $ my_command |…
takeshin
  • 1,431
  • 3
  • 19
  • 28
0
votes
1 answer

Is there any limit to AIX 5.3 pipe size?

I'm in trouble while performing cat/tail/head operation on large files on Aix 5.3. When asking for a cat of several 1Go file redirected to another one: cat file1 file2 file3 > outputfile The outputfile is limited to 2Go (cat: output error and…
snowflake
  • 127
  • 3
  • 12
0
votes
2 answers

how to check open ports of bunch of website at once with nmap/linux?

I want to use nmap in such a way that I could check bunch of server's port at once for checking whether their particular port is open or not? right now I have 10 ip addresses but in future this could be more . I know the very basic command in linux…
0
votes
1 answer

Does Apache spawn piped logger on each HTTP request?

I am examining a high-volume Apache prefork site and noticing that many log entries such as: CustomLog '|/foo/bar/cronolog -foo -bar' RewriteLog '|/foo/bar/cronolog -bar -foo' When apache logs the request or the rewrite is cronolog spawned for EACH…
Jé Queue
  • 363
  • 1
  • 3
  • 10
0
votes
0 answers

After piping Incoming mails to external script, mails are not shown in Inbox in iRedmail

I have been trying to pipe incoming mails to my python script which is just trying to read a mail and look for keywords and call api. But for some reasons my mails are not being delivered to my inbox. I am new to postfix and this is my first time…
misscoder
  • 1
  • 1
0
votes
1 answer

Pipe into command stored in bash variable

I enter two command in bash: $export g='grep "something"' $echo "something and another thing" | $g But it doesn't work. I want the second command to be evaluated by bash as : echo "something and another thing" | grep "something" What should I do…
rimalroshan
  • 139
  • 6
0
votes
1 answer

Why tail to same file create a empty file, or empty the file?

I try to maintain the last lines of a file, but when tail -n 10 test.txt > test.txt create or empty the file... SO: Ubuntu server Example: #test.txt file 20 May 23 12:24 test.txt a a a a a a a a a a use tail -n 10 test.txt > test.txt new…
DarckBlezzer
  • 173
  • 1
  • 1
  • 7
0
votes
2 answers

how to extract a certain field from standard output with cut?

I have this output and want to extract the IMAGE ID from it $ podman image ls | grep youtube-dl localhost/youtube-dl latest 2d4e37c4d609 3 hours ago 205 MB All I know piping this to cut -f3 should to this but doesn't. The…
vrms
  • 227
  • 4
  • 16
0
votes
0 answers

Is it possible to trigger a 550 SMTP answer from a script Postfix piped a mail to?

I want to prevent backscatter from within a mailing list script that I use on my Postfix mail server. Mail for a mailing list hosted there is piped to my script. At this point, Postfix can't know if the sender address is subscribed to the list, but…
0
votes
2 answers

Piping nc to sed and evaluate datetime for each row

Could someone provide any idea, how could i pipe data from nc to sed (or awk, or anything) and evaluate and write to file a timestamp after each row? What i have: # cat /etc/systemd/system/ncserver.service [Unit] Description=netcat…
M.Ch.
  • 3
  • 1
0
votes
1 answer

How can wireshark.exe on windows read from a pcap file stream?

This is probably less a wireshark question and more a "how do I pipe a file into an application" on windows. On linux, I can capture a pcap file on another host with tcpdump and pipe it back to wireshark on the local machine for a live capture…
I grok it
  • 11
  • 2
0
votes
1 answer

Linux shell: Pipe stderr and stdout to one file AND to individual files at the same time (using tee?)

I would like to form a pipe-stream that captures stdout to one file and stderr to another file AND both in a third file (so also the complete terminal output is in one file) somehow like this: process ----+-- --- + --- stdlog.txt …
0
votes
1 answer

Linux does STDOUT | STDIN piping write data to disk?

I was planning on passing encryption keys to zfs load-key pool/set through stdin. The keys passed are generated by another program in HEX format and dataset is configured to have keylocation=prompt, keyformat=hex so the key can be passed through…
0
votes
2 answers

nethogs -t | awk '{print $0}' return no output

nethogs is a linux process bandwidth monitoring tool. https://github.com/raboof/nethogs nethogs -t it's output looks like this. Refreshing: sshd: root@pts/0/4002/0 0.185156 0.0773437 unknown TCP/0/0 0 0 Refreshing: sshd:…
The Unix Janitor
  • 2,388
  • 14
  • 13
0
votes
2 answers

Run a multiline bash script piped from stdin

I'm looking for a simple way to include multi-line scripts inline in documentation to make it transparent what each step does. This works echo "echo 1234" | bash So does this echo 'for N in 1 2 3; do echo $N; done' | bash However, I'd like to use…
Nanzikambe
  • 265
  • 2
  • 8
1 2 3
10
11