10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
Environment:
I am under Ubuntu 18.04 bionic. I have an sql file consisting of 10K lines.
Objective:
What I am trying to attain is to remove everything coming after 2nd tab in each line. While searching for the answer, I found two answers and both gave expected result just for the first... (2 Replies)
Discussion started by: baris35
2 Replies
2. Shell Programming and Scripting
My file (the output of an experiment) starts off looking like this,
_____________________________________________________________
Subjects incorporated to date: 001
Data file started on machine PKSHS260-05CP
**********************************************************************
Subject 1,... (9 Replies)
Discussion started by: samonl
9 Replies
3. UNIX for Beginners Questions & Answers
Hi All,
I am using UNix Sun OS sun4u sparc SUNW,SPARC-Enterprise
My intention is to insert a line of text after 13th line of every file inside a particular directory.
While trying to do it for a single file , i am using sed
sed '3 i this is the 4th line' filename
sed: command garbled: 3... (5 Replies)
Discussion started by: gotamp
5 Replies
4. 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
5. UNIX for Dummies Questions & Answers
Hi all,
Greetings. I am facing some troubles and hope that the professionals here could help me.
I am handling a large dataset, and part of it is like below:
1 ab139 0 752566 G A
1 ab151 0 846808 T C
1 ab142 0 854250 G A
1 ab061 0 861808 A G
1 ab043 0 873558 T G... (4 Replies)
Discussion started by: Amanda Low
4 Replies
6. Shell Programming and Scripting
Is there an awk script that can easily perform the following operation?
I have a data file that is in the format of
1944-12,5.6
1945-01,9.8
1945-02,6.7
1945-03,9.3
1945-04,5.9
1945-05,0.7
1945-06,0.0
1945-07,0.0
1945-08,0.0
1945-09,0.0
1945-10,0.2
1945-11,10.5
1945-12,22.3... (3 Replies)
Discussion started by: ncwxpanther
3 Replies
7. Shell Programming and Scripting
Hi,
For my reuirement, I have to read a file from the 2nd line till the last line<EOF>.
Say,
I have a file as test.txt, which as a header record in the first line followed by records in rest of the lines.
for i in `cat test.txt`
{
echo $i
}
While doing the above loop, I have read... (5 Replies)
Discussion started by: machomaddy
5 Replies
8. Shell Programming and Scripting
Hi everyone, this is my first post here, I hope someone can help me.
I have a file which I need to delete characters '_F3' from the end of the text in the first column. The problem is that the characters may also occur elsewhere in the file (i.e. second columns onwards). I tried sed (thinking I... (6 Replies)
Discussion started by: hlwright
6 Replies
9. Shell Programming and Scripting
hi all
i want to delete a line upto a particular character. here is example.
cp cms/images/wifi-zone.png
i want to delete the line till . (cp cms/images/wifi-zone.) so the output wud be "png" only
how can i do it?
also please note down that dot (.) can also occur multiple... (12 Replies)
Discussion started by: kashifv
12 Replies
10. Shell Programming and Scripting
I have a growing file . I knew only last few lines which is constant for evey job run. I'd need to pull the Nth record from the last line. In this case i should not use search pattern. (2 Replies)
Discussion started by: ford2020
2 Replies