Posts

Showing posts from February 22, 2019

Use Find-command to filter out files with specific pattern to terminal [duplicate]

Image
Clash Royale CLAN TAG #URR8PPP 0 This question already has an answer here: How do I remove “permission denied” printout statements from the find program? 3 answers I want to show all files with the name "index.php" in a specific area of my machine. For this I wrote this code-line: -find /iu/cuve/u3 -name "index.php" I want it to only show the lines witch include "index.php" in it, but this command shows a bunch of other lines witch does not include "index.php". Many of them ends with "Permission denied", maybe thats why I can't see the "index.php" part of the line. I tried to add a -exec grep command to it, but didn't get the results I'm looking for. linux grep find share | improve this question asked Feb 1 at 14:03 Magnarok Magnarok 1 marked as duplicate by steeldriver, Kusalananda  linux Users with the  linux badge can single-handedly close linux questions as...

Removing duplicate entries and replacing it with comma | Bash

Image
Clash Royale CLAN TAG #URR8PPP 0 I have a file which contains ip address and port number in this order: ipaddress : port 1.1.1.1:21 1.1.1.1:22 2.2.2.2:443 3.3.3.3:80 3.3.3.3:443 I need Result in this below format ipaddress : port, port 1.1.1.1:21,22 2.2.2.2:443 3.3.3.3:80,443 text-processing awk sed share | improve this question edited Feb 1 at 15:44 Jeff Schaller 42k 11 56 133 asked Feb 1 at 13:33 user334662 user334662 3 2 add a comment  |  0 I have a file which contains ip address and port number in this order: ipaddress : port 1.1.1.1:21 1.1.1.1:22 2.2.2.2:443 3.3.3.3:80 3.3.3.3:443 I need Result in this below format ipaddress : port, port 1.1.1.1:21,22 2.2.2.2:443 3.3.3.3:80,443 text-processing awk sed share | improve this question edited Feb 1 at 15:44 Jeff Schaller 42k 11 56 133 asked Feb 1 at 13:33 user334662 user334662 3 2 add a comment ...