Adding character and append last element of second column
Hi,
could you help me in processing this file under bash?
I need to add some text to the first line and then append the last element of the second columns.
The input file is tab separated while the output should be space separated.
All,
I would like to add the first 10 elements of an array. Here is how I am doing it now (only included first few add ops):
#!/usr/bin/ksh
###Grab the array values out of a file###
TOTAL=`awk '/time/' /tmp/file.out | awk '{print $4}'`
set -A times $TOTAL
SUM=$((${times} + times... (3 Replies)
Hi,
I have file like below.
Unix:/pclls/turc>cat tibc.property
executeReceiver=Y
executeSender=Y
I want to replace executeSender=N in the file. My file should be like below.
executeReceiver=Y
executeSender=N
I tried with the below command, its giving error.
cat tibc.property |... (2 Replies)
Hi all
I have file with columns
F3 pathway CPS
F2
H2
H4
H5
H6 no pathway CMP
H7
H8
H9
H10
My expected output is
F3 pathway CPS
F2 pathway CPS (10 Replies)
Hello,
I have a file as follows:
ENSGALG00000000189
ENSGALG00000000189
ENSGALG00000000189
ENSGALG00000000215
ENSGALG00000000215
ENSGALG00000000218 ... (5 Replies)
Hello,
I have a simple task and I am having some trouble with the syntax. I have a variable with an assigned value,
CMD_STRING='-L 22 -s 0 -r -O -A i -N 100 -n'
I would like to add that variable to an array. As far as I have been able to look up, the syntax should be something like,
... (4 Replies)
Good evening
I have the below requirements, as I am not an experts in Linux/Unix and am looking for your ideas how I can do this.
I have file called file1 and file2.
I need to get the second column which is text1_random_alphabets and find that in file 2, if it's exists then print the 3rd... (4 Replies)
Hi Experts,
Please bear with me, i need help
I am learning AWk and stuck up in one issue.
First point : I want to sum up column value for column 7, 9, 11,13 and column15 if rows in column 5 are duplicates.No action to be taken for rows where value in column 5 is unique.
Second point : For... (1 Reply)
Please help me to get required output for both scenario 1 and scenario 2 and need separate code for both scenario 1 and scenario 2
Scenario 1
i need to do below changes only when column1 is CR and column3 has duplicates rows/values. This inputfile can contain 100 of this duplicated rows of... (1 Reply)
Discussion started by: as7951
1 Replies
LEARN ABOUT FREEBSD
od
OD(1) BSD General Commands Manual OD(1)NAME
od -- octal, decimal, hex, ASCII dump
SYNOPSIS
od [-aBbcDdeFfHhIiLlOosvXx] [-A base] [-j skip] [-N length] [-t type] [[+]offset[.][Bb]] [file ...]
DESCRIPTION
The od utility is a filter which displays the specified files, or standard input if no files are specified, in a user specified format.
The options are as follows:
-A base Specify the input address base. The argument base may be one of d, o, x or n, which specify decimal, octal, hexadecimal
addresses or no address, respectively.
-a Output named characters. Equivalent to -t a.
-B, -o Output octal shorts. Equivalent to -t o2.
-b Output octal bytes. Equivalent to -t o1.
-c Output C-style escaped characters. Equivalent to -t c.
-D Output unsigned decimal ints. Equivalent to -t u4.
-d Output unsigned decimal shorts. Equivalent to -t u2.
-e, -F Output double-precision floating point numbers. Equivalent to -t fD.
-f Output single-precision floating point numbers. Equivalent to -t fF.
-H, -X Output hexadecimal ints. Equivalent to -t x4.
-h, -x Output hexadecimal shorts. Equivalent to -t x2.
-I, -L, -l Output signed decimal longs. Equivalent to -t dL.
-i Output signed decimal ints. Equivalent to -t dI.
-j skip Skip skip bytes of the combined input before dumping. The number may be followed by one of b, k or m which specify the units of
the number as blocks (512 bytes), kilobytes and megabytes, respectively.
-N length Dump at most length bytes of input.
-O Output octal ints. Equivalent to -t o4.
-s Output signed decimal shorts. Equivalent to -t d2.
-t type Specify the output format. The type argument is a string containing one or more of the following kinds of type specifiers:
a Named characters (ASCII). Control characters are displayed using the following names:
000 NUL 001 SOH 002 STX 003 ETX 004 EOT 005 ENQ
006 ACK 007 BEL 008 BS 009 HT 00A NL 00B VT
00C FF 00D CR 00E SO 00F SI 010 DLE 011 DC1
012 DC2 013 DC3 014 DC4 015 NAK 016 SYN 017 ETB
018 CAN 019 EM 01A SUB 01B ESC 01C FS 01D GS
01E RS 01F US 020 SP 07F DEL
c Characters in the default character set. Non-printing characters are represented as 3-digit octal character codes,
except the following characters, which are represented as C escapes:
NUL
alert a
backspace
newline
carriage-return
tab
vertical tab v
Multi-byte characters are displayed in the area corresponding to the first byte of the character. The remaining bytes
are shown as '**'.
[d|o|u|x][C|S|I|L|n]
Signed decimal (d), octal (o), unsigned decimal (u) or hexadecimal (x). Followed by an optional size specifier, which
may be either C (char), S (short), I (int), L (long), or a byte count as a decimal integer.
f[F|D|L|n]
Floating-point number. Followed by an optional size specifier, which may be either F (float), D (double) or L (long
double).
-v Write all input data, instead of replacing lines of duplicate values with a '*'.
Multiple options that specify output format may be used; the output will contain one line for each format.
If no output format is specified, -t oS is assumed.
ENVIRONMENT
The LANG, LC_ALL and LC_CTYPE environment variables affect the execution of od as described in environ(7).
EXIT STATUS
The od utility exits 0 on success, and >0 if an error occurs.
COMPATIBILITY
The traditional -s option to extract string constants is not supported; consider using strings(1) instead.
SEE ALSO hexdump(1), strings(1)STANDARDS
The od utility conforms to IEEE Std 1003.1-2001 (``POSIX.1'').
HISTORY
An od command appeared in Version 1 AT&T UNIX.
BSD December 22, 2011 BSD