10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Source Code of the original script is down below please run the script and try to solve this problem
this is my data and I want it column wise
2019-03-20 13:00:00:000
2019-03-20 15:00:00:000
1
Operating System
LAB
0
1
1
1
1
1
1
1
1
1
0
1 (5 Replies)
Discussion started by: Shubham1182
5 Replies
2. Shell Programming and Scripting
Hi,
I want to know how to place a particular field availble in a record as the columnname.
Name,Sam,Age,13,School, StJohn
Name,Rita,Age,12,School, StMichael,
Name,John,Age,14,School, StAnthony
I want the output as
Name Age School
Sam 13 StJohn
Rita 12 StMichael
John 14... (6 Replies)
Discussion started by: sidnow
6 Replies
3. Shell Programming and Scripting
Hi,
I have an issue converting decimal places of a particular column, i am using below script to get the output, but the output is not generating in desired format.
awk -F"," 'BEGIN{OFS=","}{if(NR==0)getline;if ($7 != "") {if ($7 > 0) $7=$7/100 ; {printf "%.2f"... (3 Replies)
Discussion started by: rramkrishnas
3 Replies
4. Shell Programming and Scripting
Dear Team
I need to insert field(which is need to taken from previous line's first field) in first column if its blank. I had tried using sed but not find the way. Detail input and output file as below.
Kindly help for same.
INPUT:
SCGR SC DEV DEV1 NUMDEV DCP ... (7 Replies)
Discussion started by: jaydeep_sadaria
7 Replies
5. Shell Programming and Scripting
Hello,
I have a file that I want to be able to insert a new line before every instance of a regex. I can get it to do this for each line that contains the regex, but not for each instance.
Contents of infile:
Test this 1...
Test this 2...
Test this 3... Test this 4... Test this... (2 Replies)
Discussion started by: deneuve01
2 Replies
6. Shell Programming and Scripting
Hi all,
I have a file in which I have to insert commna between entries of 2 column and createa new file separated by commas not a columns
if input is
FHIT Adenosine Monotungstate Not Available
CS Trifluoroacetonyl Coenzyme A Not Available
Theo expected output is
... (5 Replies)
Discussion started by: manigrover
5 Replies
7. Shell Programming and Scripting
Hi all,
I have to insert underscore at certain places(places before and after PAxxx/PAxxxx entries in a big file like this
ESR1 PA156 leflunomide PA450192
CHST3 PA26503 docetaxel tungstate Pa4586; thalidomide Pa34958;
PAxxx/PAxxxx entries are metioned between 2 names in each row
... (4 Replies)
Discussion started by: manigrover
4 Replies
8. Shell Programming and Scripting
Hi Experts,
I have called some.txt with the following content.
oracle HYRDSRVIHUB01 pts/0 TESTIHUB 07-JUN-10 CREATE TABLE
TESTIHUB PHONE ... (12 Replies)
Discussion started by: naree
12 Replies
9. Shell Programming and Scripting
Hi all,
I want to insert a string in a specified place of a very large file. I am giving an example of the task:
I love football.
Above is a sentence in a file and I want to insert a string "the" between love and football. It is not sure that where this particular line exists. It has to... (4 Replies)
Discussion started by: naw_deepak
4 Replies
10. Shell Programming and Scripting
Hello,
I need to search in file2 for
class A : public B
{
and insert right after that the content of file1.
I am a bit lost as to which tools (which bash functions, awk...). I should use. Thanks for some directions here.
Regards (1 Reply)
Discussion started by: JCR
1 Replies