10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have file in which the data looks like this,
01,0000000,xxxxxxx/
02,xxxxxxxx,yyyyyy/
03,test1,41203016,,/
01,0000000,xxxxxxx/
02,xxxxxxxx,yyyyyy/ ... (16 Replies)
Discussion started by: r@v!7*7@
16 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I couldn't figure how to extract until last occurence of a character.
I have the string ./dir1/file1/abc.sh
The output should be /dir1/file1
So, the command should display the path until last occurence of "/".
Thanks. (3 Replies)
Discussion started by: rajivn786
3 Replies
3. Shell Programming and Scripting
Hi,
What is the best approach to grab contents between
Changes
Dependencies
from the following example snippy
Changes in packages about to be updated:
bash-3.2-32.el5_9.1.x86_64
* Thu Jun 27 22:00:00 2013 Roman Rakus <rrakus@redhat.com> - 3.2-32.1
- Fixed a bug that caused... (2 Replies)
Discussion started by: ashokvpp
2 Replies
4. Shell Programming and Scripting
I have a file
# cat asasas
AAAAAA
11
22
33
44
BBBBB
NILNILNIL
AAAAAA
22
33
44
55
66
77
88
BBBBB
NILNILNIL (2 Replies)
Discussion started by: anil510
2 Replies
5. Shell Programming and Scripting
Hello people,
Once more I need your help with SED/AWK
I need to delete up to the Nth occurence of a char (from the beggining) and until the Mth occurence of a char (from the end)
Example:
Input:
a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z
Output:
i,j
Must delete up to the... (2 Replies)
Discussion started by: drbiloukos
2 Replies
6. Shell Programming and Scripting
Hi,
I have a file, which contains the following log data.
I am trying to print fromt he file the following data:
I have tried using sed, but I am getting from the first pattern
Thanks for your help. (5 Replies)
Discussion started by: sol_nov
5 Replies
7. UNIX for Dummies Questions & Answers
Hi guys,
I like to find the Line number of Nth Occurence of a Search string in a file.
If possible, if it will land the cursor to that particualar line will be great.
Cheers!! (3 Replies)
Discussion started by: mac4rfree
3 Replies
8. UNIX for Dummies Questions & Answers
Alright, here's the deal. I'm running the following ruby script (output follows):
>> /Users/name/bin/acweather.rb -z 54321 -o /Users/name/bin -c
Clouds AND Sun 57/33 - Mostly sunny and cool
I want to just grab the "57/33" portion, but that's it. I don't want any other portion of the line. I... (5 Replies)
Discussion started by: compulsiveguile
5 Replies
9. Shell Programming and Scripting
Hi
My input file is like this for eg:
abc abc abc abc abc abc
i would like to replace "abc" with "cba" where the occurrence is divisible by 2
of eg here 2nd, 4th and 6th occurence shud be replace
can anyone suggest in awk or sed (11 Replies)
Discussion started by: raghav288
11 Replies
10. Shell Programming and Scripting
Hi
for eg my file has:
val1 | val2 | val1 | val2 | val1 | val2 | val1 | val2 |
here i need to replace '|' with '|\n' where the occurence of '|' is divisble by 2
so that the output comes like this
val1 | val2 |
val1 | val2 |
val1 | val2 |
val1 | val2 |
Requesting suggestions in... (1 Reply)
Discussion started by: raghav288
1 Replies