10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
1/
i have file test.txt
1 Jul 28 08:35:29 2014-07-28 Root::UserA
1 Jul 28 08:36:44 2014-07-28 Root::UserB i want to delete the seconds of the file, and the Root:: and the output will be:
1 Jul 28 08:35 2014-07-28 UserA
1 Jul 28 08:36 2014-07-28 UserB 2/i have another file test2.txt:... (8 Replies)
Discussion started by: fxsme
8 Replies
2. Shell Programming and Scripting
Hi there,
A total sed noob here. Is there a way using sed to delete everything before a character AND after another character on each line in a file? The deletion should also delete the indicating characters(here: an opening and a closing parenthesis).
The original file would look like... (3 Replies)
Discussion started by: bnbsd
3 Replies
3. 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
4. UNIX for Dummies Questions & Answers
dears
i have the data below, i want a command ( i think it should be sed) that add a space after the seconds as below :
Jun 24 22:28:18966568406148@
Jun 24 05:47:35966555747744@
Jun 24 05:47:53966560825239@
Jun 24 06:07:52966541147164@
Jun 24 15:49:55966566478883@
thanks... (5 Replies)
Discussion started by: thehero
5 Replies
5. Shell Programming and Scripting
Hi ,
I have a file with contents as below
group1 = aaaaa, bbbbb, ccccc, aaa
group2=aaa, bbbbb, ccccc, aaaaa
group3 = bbbbb, aaa, ccccc, aaaaa
group4 = bbbbb, aaa,ccccc, aaaaa
I want to search for "aaa" and the output should be as below
group1 = aaaaa, bbbbb, ccccc
group2= bbbbb, ccccc,... (3 Replies)
Discussion started by: anil8103
3 Replies
6. 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
7. Shell Programming and Scripting
Hi all
I am trying to get my head around doing the following....
I have an input field that could contain either a number a blank field or a whitespace field.
What I want to do is delete a 0 (zero) if it's on its own or leading the number.
So:-
\t0 delete the zero
0 delete the... (8 Replies)
Discussion started by: Bashingaway
8 Replies
8. UNIX for Dummies Questions & Answers
Hi all,
I have the following script
S1a="13 9 -0.0012041"
S1b="13 8 -1.00000 "
sed 's/${S1b}/${S1a}/g' funE00.i > tmp1
but the strings are not replaced.
Maybe the problem is in the spaces cointaned in the variables?
Thanks for your help,
Sarah (2 Replies)
Discussion started by: f_o_555
2 Replies
9. Shell Programming and Scripting
Hi...
i need a script to remove the space before and after the operator like( / ).
Ex :
Input file
apple / manago
mango / fresh apple / fresh
Desired output:
apple/manago
mango/fresh apple/fresh
Note: betwee the desired operator space should be removed, between words do not remove... (3 Replies)
Discussion started by: vasanth_vadalur
3 Replies
10. Shell Programming and Scripting
I built a 12 million record file and made a mistake, one field is 1 character too long.
The record is 40 bytes and ends always in 999. I am trying to delete the 37 character in each record. Is this possible without doing a cut and paste. (1 Reply)
Discussion started by: bthomas
1 Replies