Related
Alex Weber Updated question : http://pastebin.com/SrVC8PvW : sed file - csv2sql.sed: s|\([A-Z]*\),\([A-Z]*\),\([A-Za-z0-9’ ()\.\!-]*\),\([A-Za-z0-9’ ()\.\!-]*\),\([0-9]*\)|INSERT INTO `Schedule` (`ID`,`YEAR`,`NUMBER`,`TeamR1`,`TeamR2`, `TeamR3`, `TeamB1`, `Tea
Wanteng Some context: I'm trying to build a generic Makefile with automatic dependency generation (using GCC as described here , non-recursive, and can be used at any level of my project. To do this, the generated dependency file needs to have the following fo
Mr. Weber My script can delete the first 4 lines (if the extension) of every file in a folder .txt. I want to be able to put the file.command with this script in the same folder, so I can double click and execute it. So I made a file with this: #!/bin/bash
fi
maihabunash I found the following method to print lines from a file In this example we want to print the first line from the hosts file sed -n '1,1p' /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
But how can I do t
maihabunash I found the following method to print lines from a file In this example we want to print the first line from the hosts file sed -n '1,1p' /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
But how can I do t
Lionel I have a document and I want to remove all schemas so that only some information remains, the creator/creator of the document. I managed to replace the patterns with a single word "PATTERN" to remove them easily. How to remove this word? Here is the com
Ricky I am using the following command to replace some values in a file. But even though the command works fine, it doesn't replace it. sed -i 's|"TIBEMS:U1278:${Internal.Agent Name}"|"TIBEMS:U1278:${External.Agent Name}"|g' EMS_PRIMS01_7111_Monitor.hrb
Inia
sreekem bose I wrote a shell script with the following command: if [[ $(echo $FILE_NAME | awk -F"_" '{print $3}') == "IMAGE" ]];
then
echo "in if of f_name"
F_NAME=`echo $FILE_NAME | sed 's/IMAGE/UCM/'`
echo $F_NAME
else
echo "in else of f_name"
Oleg I have a text file: org.jitsi.videobridge.xmpp.user.shard-1.HOSTNAME=localhost
org.jitsi.videobridge.xmpp.user.shard-1.DOMAIN=auth.jc.name.com
org.jitsi.videobridge.xmpp.user.shard-1.USERNAME=name
org.jitsi.videobridge.xmpp.user.shard-1.PASSWORD=Hfr*7462
dandri First of all, I know this way is incorrect, as is often mentioned why I shouldn't be parsing the output of ls , but this is part of my university project (so I can use both sed and awk). I have to find files whose names start with a given string. I am s
dandri First of all, I know this way is incorrect, as is often mentioned why I shouldn't be parsing the output of ls , but this is part of my university project (so I can use both sed and awk). I have to find files whose names start with a given string. I am s
tabs_over_spaces I'm trying to use sed to insert at the end of each line in a file using the sed command - sed -r 's/$/ | sed -r s\/abc\/xyz\/ /' filename.extension Next, I want to use single quotes around the inner sed. This will look like - sed -r 's/$/ | se
tabs_over_spaces I'm trying to use sed to insert at the end of each line in a file using the sed command - sed -r 's/$/ | sed -r s\/abc\/xyz\/ /' filename.extension Next, I want to use single quotes around the inner sed. This will look like - sed -r 's/$/ | se
Siddesh Hoogar I'm trying to create a shell script that needs to run when a new VPS created is booted. A new VPS will be created with cPanel/WHM Panel pre-installed on CentOS 7 64-bit template. The shell script needs to change the IP address of the VPS and ass
JS rookie I am reading some configs from a text file and storing them into a variable. They are separate pipelines like this: a,b|c,d|e,f|g,h
I want to pass these into a sed command to replace lvalues from rvalues in a text file and output it to another file.
Siddesh Hoogar I'm trying to create a shell script that needs to run when a new VPS created is booted. A new VPS will be created with cPanel/WHM Panel pre-installed on CentOS 7 64-bit template. The shell script needs to change the IP address of the VPS and ass
Driven Content source.txt: gold green white black blue
yellow magenta brown
tram kilo charlie tango
Hi guys! I need to solve a mystery. I'm trying to run a small script to grep a file source.txt, pipe the grepoutput sedof the replacement string and store th
Driven Content source.txt: gold green white black blue
yellow magenta brown
tram kilo charlie tango
Hi guys! I need to solve a mystery. I'm trying to run a small script to grep a file source.txt, pipe the grepoutput sedof the replacement string and store th
Ray Blanco My sed command has #UPDATE key in the config file. Can't get the content of variable $GETKEY Can anyone help me? # Get key from output of the website.
GETKEY=`wget https://www.badips.com/get/key -qO - | awk {'print $9'} | cut -d ":" -f3 | cut -d
Ray Blanco My sed command has #UPDATE key in the config file. Can't get the content of variable $GETKEY Can anyone help me? # Get key from output of the website.
GETKEY=`wget https://www.badips.com/get/key -qO - | awk {'print $9'} | cut -d ":" -f3 | cut -d
Buffin I have ruby script that receives the name of the config file as a parameter. I need to run it with looping changes to certain parameters inside the config on each iteration. Everything works fine with sed, but I don't know how to pass sed's script outpu
sgp667 I have two files, one holds a list of patterns and the other needs to make changes based on those patterns. So far I have been trying cat patterns.txt| xargs -n1| sed 's/patternfromfile/subtitution/'
But I'm not sure how to enter xargs in 's/here //' t
sgp667 I have two files, one holds a list of patterns and the other needs to make changes based on those patterns. So far I have been trying cat patterns.txt| xargs -n1| sed 's/patternfromfile/subtitution/'
But I'm not sure how to enter xargs in 's/here //' t
KodeFor.Me I have a multisite WordPress installation with multiple sites for a company I work for, and I've generated a bash script that pulls the database tables for each site individually. Additionally, we name each site based on the location of each replica
KodeFor.Me I have a multisite WordPress installation with multiple sites for a company I work for, and I've generated a bash script that pulls the database tables for each site individually. Additionally, we name each site based on the location of each replica
Mercer I want to modify the value server.xmlin the file : <?xml version='1.0' encoding='utf-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for a
Mercer I want to modify the value server.xmlin the file : <?xml version='1.0' encoding='utf-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for a
Ethan Quintaval My input is: "INTC_KEY,ABC1|OBJID,ABC2"
I want to send the output to a file like this: DDS.INTC_KEY = REPL.OBJID AND DDS.ABC1 = REPL.ABC2
Here's what I've tried so far: sed 's/^/DDS./g' | sed 's/|/=REPL./g' | tr '\n' '~' | sed 's/~/_N~/g' | s
Ethan Quintaval My input is: "INTC_KEY,ABC1|OBJID,ABC2"
I want to send the output to a file like this: DDS.INTC_KEY = REPL.OBJID AND DDS.ABC1 = REPL.ABC2
Here's what I've tried so far: sed 's/^/DDS./g' | sed 's/|/=REPL./g' | tr '\n' '~' | sed 's/~/_N~/g' | s