10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi Guys ,
I am having a file as stated below
File 1
sa0 -- i_core/i_core_apb/i_afe0_controller/U261/A
sa0 -- i_core/i_core_apb/i_afe0_controller/U265/Z
sa1 -- i_core/i_core_apb/i_afe0_controller/U265/A
sa1 -- i_core/i_core_apb/i_afe0_controller/U268/Z
sa1 -- ... (7 Replies)
Discussion started by: kshitij
7 Replies
2. Shell Programming and Scripting
Team,
I am writing a shell script to perform few health checks of the system, where I need to delete the previous line in the text file after pattern match using sed (or) awk.
Could you please help me out on this?
For example,
<td>
<td style=color:green align=center>
</td>
</tr>... (6 Replies)
Discussion started by: Nagaraj R
6 Replies
3. Shell Programming and Scripting
I am trying to combine lines with these conditions:
1. First line starts with text of "libname VALUE db2 datasrc" where VALUE can be any text.
2. If condition1 is met then continue to combine lines through a line that ends with a semicolon.
3. Ignore case when matching patterns and remove any... (5 Replies)
Discussion started by: Wes Kem
5 Replies
4. Shell Programming and Scripting
file:
1|12322|tow|
5|23422|pow|
6|23423|cow|
3|34324|how|
deletelines:
12322
23423
My command to delete line
while read NUM
do
awk -F"\|" '$2 !~ /`"$NUM"`/' file >file.back
mv file.back file
done<deletelines (3 Replies)
Discussion started by: Roozo
3 Replies
5. Shell Programming and Scripting
Hello Experts , require help . See below output:
File inputs
------------------------------------------
Server Host = mike
id rl images allocated last updated density
vimages expiration last read <------- STATUS ------->... (4 Replies)
Discussion started by: tigerhills
4 Replies
6. Shell Programming and Scripting
BASH in Solaris 10
I have a log file like below. Whenever the pattern ORA-39083 is encountered, I want to delete the line which has this pattern and 3 lines below it.
$ cat someLogfile.txt
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'CMPA' does... (4 Replies)
Discussion started by: kraljic
4 Replies
7. Shell Programming and Scripting
Im using the command below , but thats not the output that i want. it only prints the odd and even numbers.
awk '{if(NR%2){print $0 > "1"}else{print $0 > "2"}}'
Im hoping for something like this
file1:
Text hi this is just a test
text1 text2 text3 text4 text5 text6
Text hi... (2 Replies)
Discussion started by: invinzin21
2 Replies
8. Shell Programming and Scripting
I have this input file that I need to remove lines which represents more than 30 days of processing.
Input file:
On 11/17/2009 at 12:30:00, Program started processing...argc=7
Total number of bytes in file being processed is 390
Message buffer of length=390 was allocated successfully... (1 Reply)
Discussion started by: udelalv
1 Replies
9. Shell Programming and Scripting
Hi there,
I need help about using sed. Iam using sed to delete and print lines that match the port number as listed in sedfile. I am using -d and -p command for delete match port and print them respectively. However, the output is not synchonize where the total deleted lines is not similar with... (3 Replies)
Discussion started by: new_buddy
3 Replies
10. UNIX for Dummies Questions & Answers
On Unix, it is easy to get those lines that match a pattern, by
grep pattern file
or those lines that do not, by
grep -v pattern file
but I am editing a file on Windows with Ultraedit.
Ultraedit support regular expression based search and replace.
I can delete all the lines that match a... (1 Reply)
Discussion started by: JumboGeng
1 Replies