10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I have file in below format. How i can remove the first and lost comma from this below file
,001E:001F,,,02EE,0FED:0FEF,
I need output has below
001E:001F,,,02EE,0FED:0FEF (6 Replies)
Discussion started by: ranjancom2000
6 Replies
2. Shell Programming and Scripting
Hi,
Anyone can help using SED searches a character string for a specified delimiter character, and returns a leading or trailing space/blank.
Text file :
"1"|"ExternalClassDEA519CF5"|"Art1"
"2"|"ExternalClass563EA516C"|"Art3"
"3"|"ExternalClass305ED16B8"|"Art9"
...
...
... (2 Replies)
Discussion started by: fspalero
2 Replies
3. 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
4. Shell Programming and Scripting
Hello
I've got a string of text with a number in pence, e.g. 0.52p, I need to remove the 'p' so that it just reads 0.52 without of course removing all the other 'p' characters.
Many thanks (1 Reply)
Discussion started by: mrpugster
1 Replies
5. Programming
Hi,
Could someone help me how to replace last character string.
For example
$>export T1=abcde
$>export T2=xyz
my question is how to get result abcdxyz?
Many Thanks (2 Replies)
Discussion started by: nicklau81
2 Replies
6. Shell Programming and Scripting
Hi All,
Was wondering how I can do the following....
I have a String as follows
"ACCTRL000005022RRWDKKEEDKDD...."
This string can be in a file called tail.out or in a Variable called $VAR2
Now I have another variable called $VAR1="000004785" (9 bytes long), I need the content of... (5 Replies)
Discussion started by: mohullah
5 Replies
7. 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
8. UNIX for Advanced & Expert Users
1. Is . wildcard? , the documented wildcard are "*", "?", and ""
. seems mean everything, the follwing cmd will copy everything
cp -r /tmp/test1/. /tmp/test2/
However it doesn't work for rm, why?
$ ls -a
. .. .a .aa aa t2
$ rm -rf .
$ ls -a
. .. .a .aa ... (3 Replies)
Discussion started by: honglus
3 Replies
9. Shell Programming and Scripting
Hi All,
How do i write in sed for the 6th and 7th field of etc/passwd file as it involves "/" character?
Does mine below is correct? It's incomplete script as i need help with syntax as i always getting may errors :(
Example of etc/passwd file:
blah:x:1055:600:blah... (6 Replies)
Discussion started by: c00kie88
6 Replies
10. UNIX for Dummies Questions & Answers
is it possible to escape the \ character in sed?
right now I'm trying to replace all occurances of \ with \\
sed \"s|test|test_replacement|g\" file1 > output; #this works fine
sed \"s|\\|\\\|g\" file1 > output; #this generates the following error:
sed: -e expression #1, char 17:... (1 Reply)
Discussion started by: gammaman
1 Replies