10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All
I'm trying to insert a new line at the before each comment line in a file.
Comment lines start with '#-----'
there are other comments with in lines but I don't want a new line there.
Example file:
blah
blah #do not insert here
#this is a comment
blah #some more
#another comment... (10 Replies)
Discussion started by: Mudshark
10 Replies
2. Shell Programming and Scripting
I need to read a text file and insert a string every n lines, but also have the line counter restart when I come across a header string.
Line repeating working every 3 lines using code:
sed '0~3 s/$/\nINSERT/g' < INPUT/PATH/FILE_NAME.txt > OUTPUT/PATH/FILE_NAME.txt
I cannot seem to find... (1 Reply)
Discussion started by: Skonectthedots
1 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
can some one help me out
file 1 i have
06/01 3:14 d378299
06/01 8:10 d642036
06/01 10:51 d600441
06/01 10:52 d600441
06/01 11:11 d607339
06/01 11:49 d398706
something like this and in file named list i have ( there is space btwn 06/01 and 11:49 and d398706)
d607339... (5 Replies)
Discussion started by: zozoo
5 Replies
4. Shell Programming and Scripting
I have following pattern in a file:
00:01:38 UTC
abcd
00:01:48 UTC
00:01:58 UTC
efgh
00:02:08 UTC
00:02:18 UTC
and I need to change something like the following
00:01:38 UTC
abcd
00:01:48 UTC
XXXX
00:01:58 UTC
efgh
00:02:08 UTC
XXXX (6 Replies)
Discussion started by: jjnight
6 Replies
5. Shell Programming and Scripting
Hi
I need to update a number of existing files and insert #!/bin/ksh line a the first line of the file.
Is there any awk or sed command which would help me to do that instead of doing it manually?
Thanks a lot -A (10 Replies)
Discussion started by: aoussenko
10 Replies
6. Shell Programming and Scripting
Hi ,
I am having an issue with the Awk script to insert newline for a regular expression match
Having a file like this
FILE1
####################
RXOER , RXERA , RXERC , RXERD
.RXEA(RXBSN), RXERD , REXCD
input RXEGT
buffer RXETRY
#######################
Want to match the RXE... (38 Replies)
Discussion started by: jaita
38 Replies
7. Shell Programming and Scripting
Hi folks,
I have a text file that I need to parse, and I cant figure it out. The source is a report breaking down softwares from various companies with some basic info about them (see source snippet below). Ultimately what I want is an excel sheet with only Adobe and Microsoft software name and... (5 Replies)
Discussion started by: rowie718
5 Replies
8. Shell Programming and Scripting
Hi,, Please excuse my lack of knowledge here. I think I am tring to do something fairly advanced yet am a bit of a beginner.....
I want to use a korn shell (as is the norm with others in my company) to write a script to search a file for a string and insert some text above that line.
Sudo... (5 Replies)
Discussion started by: HugoDarley
5 Replies
9. Shell Programming and Scripting
Hi, guys. I have one question:
How can I search for a line with certain string in it and then insert a string into this line?
For example:
There is a file called shadow, the contents of it are below:
**************************
...
yuanz:VIRADxMsadfDF/Q:0:0:50:7:::... (9 Replies)
Discussion started by: daikeyang
9 Replies
10. Shell Programming and Scripting
Hi folks,
I have the following program:
#! /bin/ksh
set -xv
export grepDataSource="</data-sources>"
export DB_HOST=tornado
export SCHEMA_NAME=IAS10G
export dataSource=data-sources.xml
sourceString="<data-source class=\"oracle.jdbc.pool.OracleConnectionCacheImpl\" name=\"RiGHTvDS\"... (7 Replies)
Discussion started by: nir_s
7 Replies