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. Shell Programming and Scripting
hi
i need to get the 3rd line in a string.
actually, not sure if it's a string, list, array, or something else. I'm using grep to retrieve all the numbers in a string-- in the console, it displays as multiple lines:
$ echo "Sink 0: reference = 0: 153% 1: 45%, real = 0: 62%" | grep -o *
0... (4 Replies)
Discussion started by: johnywhy
4 Replies
4. Shell Programming and Scripting
Hi All,
I am very new to shell scripting and tried to search this in the forum but no luck.
Requirment:
I have an input file which is comma separated. I need to replace the value in 4th column with another value. This has to happen for all the lines in the file.
Sample data:
Input... (2 Replies)
Discussion started by: arunkumarsd
2 Replies
5. 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
6. Shell Programming and Scripting
Hi
I have requirement to find nth occurrence in a file and capture data from with in lines (between lines)
Data in File.
<QUOTE>
<SESSION>
<ATTRIBUTE NAME='Parameter Filename' VALUE='file1.parm'/>
<ATTRIBUTE NAME='Service Name' VALUE='None'/>
</SESSION>
<SESSION>
<ATTRIBUTE... (6 Replies)
Discussion started by: tmalik79
6 Replies
7. Shell Programming and Scripting
Hi,
Can anyone help me know how to replace a string with the new line
for ex:
file1
val1 or val2 or val3 or
I need to replace the "or" with new line.
Thanks in advance (2 Replies)
Discussion started by: mr_manii
2 Replies
8. UNIX for Dummies Questions & Answers
hi,
i currently have a file with columns similar to this
customer name owed
CID123 John 300
CID342 harry 500
at present i use use awk to find the amount owed by the customer using the customer ID (CID).
if the customer spends more money how would i go about using sed/awk etc to... (2 Replies)
Discussion started by: skinnygav
2 Replies
9. UNIX for Advanced & Expert Users
All,
Is there any way out to display the nth line before the string is matched ???
Eg : If i have a file which has the following contents and if i want to get the
3rd line before the string is matched
a
b
c
d
e
f
if i give the input as f and lines before the match as 3 then it should... (5 Replies)
Discussion started by: helper
5 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I have several files with data that have to be imported to a database. These files contain records with separator characters. Some records are corrupt (2 separators are missing) and I need to correct them prior to importing them into the db.
Example:
... (5 Replies)
Discussion started by: stresing
5 Replies