Hi,
I need to insert a line into a file underneath an existing line in the file, but am unsure as to the syntax. I'm pretty sure sed can be used though, although any ideas are more than welcome. For example:
File
----
Line 1
Line 2
Line 3
Line 4
Line 6
I need to say: Insert "Line 5"... (1 Reply)
I am trying to retrieve part of a line from /boot/grub/menu.lst
The line is :
gfxmenu (hd0,0)/usr/share/gfxboot/themes/pclinuxblue/boot/message
I have figured out how to get this line into a file by itself.
sed '/gfxmenu/ !d' /boot/grub/menu.lst > /tmp/menu.lst.pcl_tc
What I need to... (2 Replies)
Hello All,
Does anybody know how to extract the entries from the 1st and second column that match a multiple regex expression using either sed or awk?
I have a 40 k file with the data that looks like this.
2 VZudbEE.ds_HP11i-726..>
2 VZudbEEE.ds_IB-726-5..>
2... (1 Reply)
Can someone please help me correctly frame the below sed command:
sed 's/.*/$(date +%Y%m%d)' filepattern
I have read a line of the file in filepattern variable which is like below:
P.182.MKT_DISC.*.2_1_1.*
I want to replace the last .* part with the current date in the format yyyymmdd.... (6 Replies)
hi all,
tnsping DBNAME > out.txt
cat out.txt
TNS Ping Utility for Linux: Version 10.2.0.2.0 - Production on 23-JUL-2009 05:49:52
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
/fisc/oracle/product/10.2.0/network/admin/sqlnet.ora
Used TNSNAMES adapter to... (2 Replies)
I am executing the following command:
sort file1.txt | uniq -c | sort -n > file2.txt
The problem is that in file 2, I get leading spaces, Like so:
1 N/A|A8MW11
8 N/A|ufwo1
9 N/A|a8mw11
10 900003|smoketest297688
10 N/A|a9dg4
10 danny|danni
12... (5 Replies)
Hi,
I have some files being sent to me that have dates in them in this format:
from
1/8/2011 15:14:20
and I need the dates in this format (mysql date format)
To
2011-01-08 15:14:20
all I have so far is the regexp that detects the format:
sed -r -e 's@\1/\2/\3\4\5\6]::$@do... (7 Replies)
Hi I have a file that contains lines starting with a particular string plus a Colon: I need to output all these lines but only what comes after the colon
Can you pelase assist?
Example of lines in the file:
com.ubs.f35.cashequities/cashequities: 1 2
... (5 Replies)