I have some data like this:
I want out put this format:
what does this mean is: if the first column is char(a) set it right with space and length(acii 32)if the first column is number(n) set it left with 0and length(acii 48)
pls help! thank you !
Hello hhdzhu,
Welcome to forums, hope you will enjoy learning and sharing knowledge here. Following may help you in same.
Output will be as follows.
If you have any more requirements on same then please do let us know the sample Input_file and expected output with all conditions, hope this helps you. EDIT: Adding a non-one liner form for solution on same now too.
Thanks,
R. Singh
Last edited by RavinderSingh13; 03-22-2016 at 12:22 PM..
Reason: Added a non-one liner form of solution now.
This User Gave Thanks to RavinderSingh13 For This Post:
I have a file containing a list of references and I want to run a script that will make the same action for each reference.
The input file changes every hour, it's why I want to use a script that can read in a file, record by record, and run a specific action for the reference readed.
Thanks... (1 Reply)
Hello,
I read a file whose in lines are datas and between thses datas there is blank characters (10, 12 or 5 or 1 .......)
So when i use the command while read line in the script(see under) there is also only one character between the datas and the others blank characters are not here.
... (3 Replies)
Hi
I have a LONG ! column of text and I would like to format this into several columns.
so from this
abcd
efgh
ijkl
mnop
qrst
uvwx
yz12
to this
abcd efgh ijkl
mnop qrstu vwx
yz12 (2 Replies)
HI guys,
I have created a script to read 1 column in a csv file and then place it in text file.
However, when i checked out the text file, it is not in a column format...
Example:
CSV file contains
name,age
aa,11
bb,22
cc,33
After using awk to get first column
TXT file... (1 Reply)
Hi everybody
I want to manipulate the output of this command: df -h to something like this:
df -h | awk '{print"\t\t "$1"\t\t"$6"\t\t"$2"\t\t" $4}' | sed 's/Mounted/Mount Point/g' | sed 's/Avail/Free Space/g'but my problem is: if for example the mounting point is a long name everything beside... (3 Replies)
hi,
my input file is containg uid, eriMaster ,eriResign, ericontry, dept.
some of the uid are not having all info.
out put should include all info irrespctive of datas of input file
if any one data is missing, then it has to print Null or zero..then continue with the existing one.
here... (0 Replies)
Hi People !!
I need your help.
I have a a txt file "example" with it datas.
11:35 10/12/2003 10.10.10.1 God.com 5 country Responsable of ASN
11:37 12/12/2003 10.10.10.1 FATHER.COM 5 country Responsable of ASN
11:40 14/12/2003 10.10.10.3 www.mother 6... (6 Replies)
Hi All,
i have two excel sheets with same column name as below
col1 col2 col3
---- ---- -----
1 121 156
24 456 788
45 444 777
765 32 77
col1 col2 col3
---- ---- -----
24 456 ... (1 Reply)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I would like to know how to display my output to this format below:
5000 Bash
300 zsh
0 sh
... (4 Replies)