10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I wrote an awk script to filter "uninteresting" commands from my ~/.bash_history (I know about HISTIGNORE, but I don't want to exclude these commands from my current session's history, I just want to avoid persisting them across sessions).
The history file can contain multi-line entries with... (6 Replies)
Discussion started by: ivanbrennan
6 Replies
2. Shell Programming and Scripting
Hi,
I have file which contains following lines
A| 965.|Mr.|35.45| 66.
B| 33.| a456.| 77.
The output should be
A|965|Mr.|35.45|66
B|33| a456.|77
Basically if a Number has space in prefix and . in suffix remove both.
So pattern could be if there is a | which has next two characters as... (1 Reply)
Discussion started by: wahi80
1 Replies
3. Shell Programming and Scripting
Hi Experts,
i have a file like below
****
table name is xyz
row count for previous day 10
row count for today 20
diff between previous and today 10
scan result PASSED
****
table name is abc
row count for previous day 90
row count for today 35
diff between previous and today 55... (4 Replies)
Discussion started by: Lakshman_Gupta
4 Replies
4. Shell Programming and Scripting
Hi,
I'm a newbie with scripting so I'd appreciate any help.
I have a file import.txt with below text
AA_IDNo=IDNoHere
AA_Name=NameHere
AA_Address=AddressHere
AA_Telephone=TelephoneHere
AA_Sex=SexHere
AA_Birthday=BirthdayHere
What I need is that the Lines for Name, Address and... (3 Replies)
Discussion started by: heretolearn
3 Replies
5. Shell Programming and Scripting
Although my sed skills are gradually developing, thanks in large part to this forum, I'm having a hard time dealing with pattern space and looping, which I suspect is what I'll need a better handle on to figure out my current issue, which is converting a multi line file like this:
... (4 Replies)
Discussion started by: tiggyboo
4 Replies
6. Shell Programming and Scripting
I've been using sed to help with reformatting some html content into latex slides using the beamer class. Since I'm new to sed, I've been reading a lot about it but I'm stuck on this one problem.
I have text that looks like this:
*******************
line of text that needs to be... (4 Replies)
Discussion started by: tfrei
4 Replies
7. Shell Programming and Scripting
If the string is of the pattern XxxXyzAbc...
The expected out put from sed has to be Xxx Xyz Abc ...
eg: if the string is QcfEfQfs, then the expected output is Qcf Ef Efs.
If i try to substitute the pattern with space then the sed will replace the character or pattern with space,... (1 Reply)
Discussion started by: frozensmilz
1 Replies
8. Shell Programming and Scripting
Hi,
I'm new to sed and i'm having a few difficulties.. I need to append the current line to the pattern space, which already contains that same line, e.g.:
current line : test
pattern space : test|test
I was able to do this using the hold space, but the problem is that in the next step of... (2 Replies)
Discussion started by: delucasvb
2 Replies
9. UNIX for Dummies Questions & Answers
why does sed 's/.* //' show the last word in a line
and
sed 's/ .*//' show the first word in a line? How is that blank space before or after the ".*" being interpreted in the regex?
i would think the first example would delete the first word and the next example would delete the second... (1 Reply)
Discussion started by: glev2005
1 Replies
10. Shell Programming and Scripting
Morning, people!
I'd like to call upon your expertise again, this time for a sed endeavor.
I've already searched around the forums, didn't find anything that helped yet.
background: Solaris 9.x, it's a closed system and there are restrictions to what is portable to it. So let's assume I... (4 Replies)
Discussion started by: ProGrammar
4 Replies