Problem with blanks, shifting the row when using awk
Hello,
I have files with fixed length fields.
I want to take 1st, 3rd, 4th and 6th string.
Usually 3rd and 4th string are coming as it is on the first row /1234567 and 1234567/, then I can use
and it works. But the problem comes when the 3rd string is shorter, like it is on the second row. It is being shifted with one column.
I was reading and trying with nawk and substr, but I am not so good with Unix.
Could you please help.
Thanks in advance!
Hi,
Im trying to write something that will report if a filesytem is over 80% but the problem is the output reports on a dir that is a 9%.
any ideas?
this is what I have
*************************************************
if
then
param=90
else
param=$1
fi
df -kl | grep... (1 Reply)
Hi, I am having a file and grabbed the contents of the field according to field widths. The command i used is:
awk 'BEGIN{FIELDWIDTHS="10 25 20 14 6 10"}{print$4,$5,$6}' newtext.text >test1.txt
i got the output for example:
val1 val2 val3
<blank> ... (3 Replies)
Hi all,
I am using the below command to shift the lines in a file which was advised by Anchal in this forum:
awk -v total_records=$(cat redirects.virgin-atlantic.com.conf | wc -l) '{ if(NR>(total_records - 2)) printf "\t%s\n", $0; else print $0 }' align
but I am getting the below error:... (7 Replies)
hi
My System is Sun Microsystems Inc. SunOS 5.10 Solaris
Partition Info is
/dev/vx/dsk/bootdg/var
27G 25G 1.2G 96% /var
/dev/vx/dsk/bootdg/oravol
110G 54G 56G 49% /export/home
I want to shift space 20G from /export/home to /var
What should be the command ?? (2 Replies)
I want to write a scrpit to merge files row wise (actually concatinating)
main.txt
X Y Z
file 1
A B C
file 2
1 2 3
now i want the script to check if the file1 is empty or not, if empty then make it like
A B C
1 2 3
again to check if second file is empty if not do as done... (0 Replies)
Hi Friends,
I have a single column data like below.
1
2
3
4
5
I need the output like below.
0
1
2
3
4
where each row (including first row) subtracting from first row and the result should print below like the way shown in output file.
Thanks
Sid (11 Replies)
I have the following functions which shifts the text by 4 and 8 characters. How can I pass an integer for the shift so that the text is shifted accordingly?
void prValue4_vd (
FILE* stream, // name of output stream
const char* value, // value associated with argument... (2 Replies)
I am trying to remove $1 along with the blank values from the file. Thank you :).
file
R_Index Chr Start End Ref Alt Func.IDP.refGene Gene.IDP.refGene GeneDetail.IDP.refGene Inheritence ExonicFunc.IDP.refGene AAChange.IDP.refGene avsnp147 PopFreqMax ... (5 Replies)
Hi Forum.
I have a unique problem that I'm hoping someone can assist me.
I'm generating a fixed width file and one of the output column (person_name at col. pos.#483 defined as string(36) sometimes contains french characters in the name and it causes the next column of data to shift to the... (10 Replies)