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
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
3. Shell Programming and Scripting
Hello,
I have some problem in inserting the space for the pairs of columns.
I have the input file :
I used this code below in replacing it using space in specific column (replace space in each two columns)
sed -e "s/,/ /2" -e "s/,/ /3" inputfile
Output showed :
However, I have many... (3 Replies)
Discussion started by: awil
3 Replies
4. Shell Programming and Scripting
I have the following data:
Dec 24 11:31:10 0000008b 9911662486 Answered Price SGD 0.003 PERIOD: 0 m 6 s
Dec 24 11:21:42 00000086 9911662486 Answered Price SGD 0.001 PERIOD: 0 m 2 s
Dec 20 15:34:28 00000004 9911662486 Answered Price SGD 0.007 PERIOD: 0 m 12 s
Dec 20 18:42:30 0000017b... (6 Replies)
Discussion started by: alegnagrp
6 Replies
5. Shell Programming and Scripting
Hi,
I want to insert the text 'Unknown' in 2 specific columns in a csv file (actually | separated) if the column is blank. Its always the same columns.
I have tried using sed: sed "s/||/|Unknown|/g"
but there are occasion where other fields are blank and they need to be left blank. This... (4 Replies)
Discussion started by: ksexton
4 Replies
6. Shell Programming and Scripting
Can anyone please help with this? I have 2 files as given below.
If 2nd column of file1 has pattern foo1@a, find the matching 1st column in file2 & replace 2nd column of file1 with file2's value.
file1
abc_1 foo1@a ....
abc_1 soo2@a ...
def_2 soo2@a ....
def_2 foo1@a ........ (7 Replies)
Discussion started by: prashali
7 Replies
7. Shell Programming and Scripting
Hi all,
i have data like this
joe : 1 :a
bob : 2 :b
sue : 3 :c
foo : 4 :d
at column 2 i want to insert TOP to the top column and at column 3 i want to insert BOTTOM to the bottom column. and the result will... (12 Replies)
Discussion started by: psychop13
12 Replies
8. Shell Programming and Scripting
So I work in a 1 to 1 laptop deployment and sometimes we need to mass order parts. The vendor will send us a text file and we have to manually input serial numbers. Well I have a full blown web based inventory system which I can pull serial number reports from.
I then have to input the part... (4 Replies)
Discussion started by: tlarkin
4 Replies
9. Shell Programming and Scripting
Hi,
I am having trouble converting a text file. I have been working for this whole day now, still i couldn't make it.
Here is how the text file looks:
_______________________________________________________
DEVICE STATUS INFORMATION FOR LOCATION 1:
OPER STATES: Disabled E:Enabled ... (5 Replies)
Discussion started by: Issemael
5 Replies
10. Shell Programming and Scripting
I am trying to edit my /etc/shadow file globally to make each line change from:
rrrtest:BBBuhiD49QA:12881::::::
rtest1:.GHXbqSCYU:12935::::::
To
rrrtest:BBBuhiD49QA:12881::90:90:::
rtest1:.GHXbqSCYU:12935::90:90:::
I only want to change those columns.
Any help or guidance would be... (7 Replies)
Discussion started by: tercex11
7 Replies