I am not allowed to disclose the data from my current organisation - UST Global Technologies and hence given sample data.
I am working on a script to take output from IBM MQ ffstsummary FDC files.
I have almost completed the script, but alignment problem still says with awk output.
I have attached exact sample data with this post that I am trying to achieve.
Given below code which created for my give task.
Moderator's Comments:
Seriously: Please use CODE tags as required by forum rules!
Alright, I'm relativly new to the Unix enviroment and C in general. I'm writing a script for AWK to search through a file and return what it finds with a center alignment, but so far, I can't get it to work. If anyone could help me out, I'd really appreciate it. (1 Reply)
Dear Champs,
i have a file let a.txt having value
number text
00 123
012
145 456
...etc
i need number and text column vales should right align ??? how can i achive this ???
NOTE number is of max 3 char and text can take max 7 char...so if any records are less than above lengths... (2 Replies)
We have a guy at work who is trying to copy and paste from one file to another using vi and highlighting the code to copy with a mouse.
Source file:
xyz 123 abc 999
zyx 321 cba 999
xyz 123 abc 999
But when he pastes it he gets (I put the underlines in to show... (4 Replies)
Hi,
I am having a file with with format.
however, for longer xml, the xml code has been truncated like this.
F1 |###################### |String1 |<XML><REQ><MSGTYPE>DBDIRECT</MSGTYPE><SYNC>0</SYNC><CLIENT>C11</CLIENT>NAME=MYNAME|JOB=MYJOB|
| ... (3 Replies)
Hi Gurus,
This is my raw data. How would I able to format this output into a better alignment?
/dev/vg00/lvol5 /home 0.12 GB 0.02 GB 0.10 GB 19%
/dev/vg00/misc /misc 28.43 GB 4.92 GB 23.51 GB 17%
/dev/vg00/lvol6 /opt 8.25 GB 5.43 GB 2.82 GB 65%
/dev/vgsap/ora10264 ... (10 Replies)
HI all,
I tried to edit my files using HP-UX but my output tends to not align when I add another character in the files
to edit my files i used the command is as follow
chmod +w filename
vi filename
Help, :eek: (1 Reply)
Hi Everyone,
I need some help to construct a long 'Sbjct' string from the following input using incremental order of 'Sbjct' starting number (e.g. 26325115,33716368,33769033,34869860 etc.)
Different 'Sbject' string will be separated by 'NNNN's as:
... (6 Replies)
*1 flash read test(*do_test1*) PASS
*2 xxxxxxxxxxx flash write test(*do_test2) FAIL ------>xxxxx
*1 flash read test(*do_test1*) PASS
*2 xxxxxxxxxxx flash write test(*do_test2) FAIL ------>xxxxx
I want pass and Fail to be aligned
if each line uses printf or echo to print, is... (5 Replies)
Discussion started by: yanglei_fage
5 Replies
LEARN ABOUT MINIX
cut
CUT(1) General Commands Manual CUT(1)NAME
cut - select out columns of a file
SYNOPSIS
cut [ -b | -c] list [file...]
cut -f list [-d delim] [ -s]
OPTIONS -b Cut specified bytes
-c Select out specific characters
-d Change the column delimiter to delim
-f Select out specific fields that are separated by the
-i Runs of delimiters count as one
-s Suppres lines with no delimiter characters, when used
EXAMPLES
cut -f 2 file # Extract field 2
cut -c 1-2,5 file # Extract character columns 1, 2, and 5
cut -c 1-5,7- file # Extract all columns except 6
DESCRIPTION
[file...]" delimiter character ( see delim)" with the -f option. Lines with no delimiters are passwd through untouched"
Cut extracts one or more fields or columns from a file and writes them on standard output. If the -f flag is used, the fields are sepa-
rated by a delimiter character, normally a tab, but can be changed using the -d flag. If the -c flag is used, specific columns can be
specified. The list can be comma or BLANK separated. The -f and -c flags are mutually exclusive. Note: The POSIX1003.2 standard requires
the option -b to cut out specific bytes in a file. It is intended for systems with multi byte characters (e.g. kanji), since MINIX uses
only one byte characters, this option is equivalent to -c. For the same reason, the option -n has no effect and is not listed in this man-
ual page.
SEE ALSO sed(1), awk(9).
CUT(1)