10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi All,
I need to print the characters in the previous line just before the regular expression match
Please have a look at the input file as attached
I need to match the regular expression ^ with the character of the previous like and also the pin numbers
and the output file should be like... (6 Replies)
Discussion started by: kshitij
6 Replies
2. Shell Programming and Scripting
I will appreciate if you help me here in this script in Solaris Enviroment.
Scenario:
i have 2 files :
1) /tmp/TRANSACTIONS_DAILY_20180730.txt:
201807300000000004
201807300000000005
201807300000000006
201807300000000007
201807300000000008
2)... (10 Replies)
Discussion started by: teokon90
10 Replies
3. Shell Programming and Scripting
Dear Unix Forums,
I am hoping you can help me with a pattern matching problem.
What am I trying to do?
I want to replace multiple lines of a text file (that match a multi-line pattern) with a single line of text. These patterns can span several lines and do not always have the same number of... (10 Replies)
Discussion started by: thefang
10 Replies
4. Shell Programming and Scripting
HI Guys,
My Input :-
R3 AV44 50 0 100 100 100
R3 AV44 1 0 100 100 100
R3 AV45 50 0 100 100 100
R3 AV45 0 3 100 100 100
R3 AV45S 50 0 100 100 100
R3 AV45S 0 4 100 100 100
Output :-
R3 AV44 50 0 100 100 100 1 0 100 100 100
R3 AV45 50 0 100 100 100 0 3 100 100 100
R3 AV45S 50 0... (9 Replies)
Discussion started by: pareshkp
9 Replies
5. Shell Programming and Scripting
Sample file:
This is line one,
this is another line,
this is the PRIMARY INDEX line
l ;
This is another line
The command should find the line with “PRIMARY INDEX” and remove the last character from the line preceding it (in this case , comma) and remove the first character from the line... (5 Replies)
Discussion started by: KC_Rules
5 Replies
6. Shell Programming and Scripting
i want to find the position of a character in a line , the first position, last, 5th occurence position , i ve tried grep -n , and expr index but they dont fit the bill. Please let me know if there is any other alternative (2 Replies)
Discussion started by: phpsnook
2 Replies
7. Shell Programming and Scripting
Hello. I'm trying to delete one character in determinate position.
Example:
qwEtsdf123Ecv34
<delete character in positión 3>
Result:
qwtsdf123Ecv34
Plase, help me.
Thanks (4 Replies)
Discussion started by: maria_florencia
4 Replies
8. Shell Programming and Scripting
I want to remove text from nth position to nth position couple of times in same line
my line is
"hello is there anyone can help me with this question"
I need like this
ello is there anyone can help me with question
'h' is removed and 'this' removed from the line. I want to do this... (5 Replies)
Discussion started by: elamurugu
5 Replies
9. UNIX for Dummies Questions & Answers
I'm not sure if the problem I'm seeing is an artifact of sed or simply a beginner's mistake. Here's the problem: I want to add a zero-width space following each underscore between XML tags. For example, if I had the following xml:
<MY_BIG_TAG>This_is_a_test</MY_BIG_TAG>
It should look like... (8 Replies)
Discussion started by: rhetoric101
8 Replies
10. Shell Programming and Scripting
hi,
when i am doing the following things getting error
Can anyone please suggest
i have a file where there is a line like the following
branch=dev sdf dev jin kilii fin kale boyle dev james dev
i want to search the existance of dev in the above line.
cat "$file" | sed -n... (8 Replies)
Discussion started by: millan
8 Replies