10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I need to find and replace a date format in a SQL script with sed. The original lines are like this:
ep.begin_date, ep.end_date, ep.facility_code,
AND ep.begin_date <= '01-JUL-2019'
ep.begin_date, ep.end_date, ep.facility_code,
AND ... (15 Replies)
Discussion started by: duke0001
15 Replies
2. Shell Programming and Scripting
I need to identify the exact text of San Antonio Generator Running in the output my script which lands to a text file. Once SED finds the specific text, I need it to insert one line above the matched text.
Here is what I have so far that isn't working all that well for me. Any help would be... (7 Replies)
Discussion started by: jbrass
7 Replies
3. UNIX for Advanced & Expert Users
Hi, I have following data in a file. Not all but most of the lines start with letter 'T' has 8 SPACES from column 121 to 128 and I want to replace that portion with some dummy value. Is it possible through sed?
Input File:-
T1111111111111A 20140310000000005076358416369283 AAAAA ... (6 Replies)
Discussion started by: jnrohit2k
6 Replies
4. Shell Programming and Scripting
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Discussion started by: vivek d r
10 Replies
5. UNIX for Dummies Questions & Answers
First of all, please have mercy on me. I am not a noob to programming, but I am about as noob as you can get with regex. That being said, I have a problem.
I've got a string that looks something like this:
Publication - Bob M. Jones, Tony X. Stark, and Fred D. Man, \"Really Awesome Article... (1 Reply)
Discussion started by: egill
1 Replies
6. Shell Programming and Scripting
Can someone tell me how I can do this?
e.g:
a=$(echo -e wert trewt ertert ertert ertert erttert
erterte
rterter
tertertert
ert)
How do i replace the STRING with $a?
I try this:
sed -i 's/STRING/'"$a"'/g' filename.ext
but this don' t work (2 Replies)
Discussion started by: jforce
2 Replies
7. HP-UX
Hi,
I have a log file, where i am required to identify the line number, where a particular string/line appears in the log file.
And then copy 200 lines above that line number to a new file.
Can someone provide pointers on how to write this script or what command to be used ?
Any... (1 Reply)
Discussion started by: kk2202
1 Replies
8. Shell Programming and Scripting
Hi,
i call my shell like:
my_shell "my project name"
my script:
#!/bin/bash -vx
projectname=$1
sed s/'PROJECT_NAME ='/'PROJECT_NAME = '$projectname/ <test_config_doxy >temp
cp temp test_config_doxy
the following error occurres:
sed s/'PROJECT_NAME ... (2 Replies)
Discussion started by: vivelafete
2 Replies
9. Shell Programming and Scripting
Hi,
I have a log file, where i am required to identify the line number, where a particular string/line appears in the log file.
And then copy 200 lines above that line number to a new file.
Can someone provide pointers on how to write this script or what command to be used ?
Any... (2 Replies)
Discussion started by: kk2202
2 Replies
10. Shell Programming and Scripting
Hello to all,
On aix, I want to identify a term on a line in a file and then add a word at the end of the line identified. I do not want the word to be added when the line contains the symbol "#".
I use the following command, but it deletes the term identified then adds the word.
#sed... (4 Replies)
Discussion started by: dantares
4 Replies