Skip to main content

Questions tagged [sed]

Sed stands for Stream EDitor - one of the basic tools in the POSIX environment. It processes one or more files according to an editing script and writes the results to standard output. Created in Bell Labs, it has been around since mid-70s.

1 vote
5 answers
563 views

I have a comma separated line I am using awk to extract fields from. Server1,poweredOn,10.0.18.70,"Blue, Green",POC,Vsphere However, when it comes to the text in double quotes ("Blue, ...
adamtjgogo's user avatar
0 votes
3 answers
252 views

I am trying to update the Kerio Connect's mailserver.cfg file on Ubuntu 20.04 with the current UNIX time so that it synchronizes correctly with a second backup server. I want to change the number ...
Fgerrits's user avatar
0 votes
2 answers
376 views

I need to display each IBM MQ Queue Manager queue along with its depth. I can do this with a command like echo DISPLAY QLOCAL(QE*) WHERE(CURDEPTH GE 0) | runmqsc QMNAME. The output is similar to this: ...
markfree's user avatar
  • 143
0 votes
1 answer
214 views

I am trying to use sed to replace a string like '12h' by '3h' sed -i 's/length_s = '12h'/length_s = '3h'/g' my_files but it didnt work
Rabah's user avatar
  • 1
0 votes
1 answer
123 views

I am not an expert with awk tool. I must miss something obvious... What works so far: [root@checkmk ~]# awk '/^[[:blank:]]*SSLCertificateFile/ {gsub(/\/etc\//, "/not_etc/")} 1' \ /etc/httpd/...
gabrielgbs97's user avatar
0 votes
1 answer
588 views

I created this sed in order to delete the comment lines lines from fstab ( comment can ne with begin of space or TAB etc ) sed '/^[[:blank:]]*#/d' /etc/fstab in my case I want to add also the ...
King David's user avatar
0 votes
2 answers
703 views

I have a directory that looks like so : /path/to/files/data-file.1 /path/to/files/data-file.2 /path/to/files/data-file.3 /path/to/files/data-file.4 /path/to/files/data-file.5 /path/to/files/data-file....
Ror's user avatar
  • 383
1 vote
2 answers
4k views

Let's imagine the following scenario. I have an host key ABCDEF1234 for a given hostname, so my known_hosts file looks like this (unhashed version): example.com ssh-rsa ABCDEF1234 Now I connect to it,...
shodanex's user avatar
  • 242
2 votes
2 answers
363 views

I have the below data (lscpu output) for 1000 servers and I want the same in excel but in row format and not as in command output in columns 1.2.3.4 CHANGED Architecture: ...
Loki's user avatar
  • 21
0 votes
1 answer
687 views

Trying to insert a line feed on large files in UNIX when a text string matches. Any file around 1GB or less, it works. Anything over that size, it does not complete the replace. It appears to do ...
TimBurke's user avatar
-1 votes
1 answer
272 views

I have a file that looks like the following: /path/to/a/very/long/path 0 0 0 0 0 0 I need to move the line starting with a number (this can be any value not necessarily 0) to the end of the ...
djc72uk's user avatar
  • 33
4 votes
1 answer
3k views

It isn't clear exactly what more needs to be escaped in the following macro to allow it to be used with awk or sed on FreeBSD. define(`RELAY_MAILER_ARGS', `TCP $h 2525')dnl Here is an awk command ...
Utkonos's user avatar
  • 398
0 votes
1 answer
153 views

I've built an SQL migration script that will replace text in a MySQL dump file. Replacements would be easy with sed, but we must account for special serializations (PHP Serialize). The code below ...
Richard Tyler Miles's user avatar
1 vote
1 answer
365 views

I am looking for some hints, how I could achive a better, more elegant, efficient solution. So I've got a file containing a list of names. names.txt: Doe John del Super Mario van Hoppity Jenny van der ...
zippy-flop's user avatar
0 votes
1 answer
1k views

I want to get the latets version number from this website: https://www.mailpiler.org/wiki/download so I do a curl to get the content and then just use a pipe to search for the string using grep curl ...
helpmenicely's user avatar

15 30 50 per page
1
2 3 4 5
19