I have got a file BeforeSort.txt having 40 fields seperated by "|"
First field= RecordType (Value will be P or FP)
Second field= CamCode
Third field = UpdatingDate
Fourth field = ProductType
Fifth field = ActionCode (Value may be 01, 02 or 03)
Sixth field = ProductCode
and so on
My... (1 Reply)
Hi guys,
I have the following example data:
A;00:00:19
B;00:01:02
C;00:00:13
D;00:00:16
E;00:02:27
F;00:00:12
G;00:00:21
H;00:00:19
I;00:00:13
J;00:13:22
I run the following sort against it, yet the output is as follows:
sort -t";" +1 -nr example_data.dat
A;00:00:19 (16 Replies)
I have a variable, defndata, which is a number (fetched from a file using awk).
I want that if defndata is not initialized (that is its not found in the file using awk), then to execute a block of statements, otherwise execute another block.
if
then
....
else
...
fi
Now this... (4 Replies)
i 've noticed the following difference between freebsd cp and gnu cp
from the freebsd cp man page:
-R ... If the source_file ends in a /, the contents of the directory are copied rather than
the directory itself. ...
on gnu cp from the man pagewhile on gnu cp manpage:
‘-r'... (2 Replies)
Hi
I am using "trap" command in my script to prevent the user from running Ctrl-C during the its execution. My script creates number of children processes which in turn create some children processes as well during the execution.
When user / tester tries to run Ctrl-C, the parent process is... (1 Reply)
Hi,
Suppose if I have a file having data like this:
$ cat file.txt
A
B C
D
And, if I do a cut operation like this:
$ cut -d" " -f2 file.txt
The output is
A
C
D
This is the same for even if we try to get the field 3 with -f3 (assume line 2 has 3 fields : C E F).
The above... (1 Reply)
fg = foreground bg = background
I have a cobol program that I start with a very simple script.
The script is not at fault as it has not changed and the program worked in fg and bg before.
I have altered the logging in the program and moved my cursor declare to working storage.
The program runs... (6 Replies)
Hi,
I'm trying to understand why the find command below is not listing a directory which was modified long back from the number of days specified in the mtime part. :confused:
user-aster :/mydir
$ ls -ld 1607570a-4fed44bb-4988
drwxr-xr-x 3 xyz abc 4096 Jun 29 01:02 1607570a-4fed44bb-4988... (4 Replies)
Hello All,
I came across this line in a shell script that I was looking at yesterday. Couldn't get a clue of what it does. :confused:
....
....
blah blah
....
.....
exec >&- 2>&-
......
blah blah
.....
Can someone explain me this??
Usually I have seen exec commands used to... (3 Replies)
I have a script as below.
bash-3.00$ cat test.sh
#!/usr/bin/ksh
path=`pwd`
echo $path
var=$path/temp11
echo $var
If run it is giving output
bash-3.00$ ksh test.sh
//var/tmp/SB2/miscellaneous
//var/tmp/SB2/miscellaneous/temp11 (5 Replies)
Discussion started by: millan
5 Replies
LEARN ABOUT CENTOS
column
COLUMN(1) User Commands COLUMN(1)NAME
column - columnate lists
SYNOPSIS
column [options] file...
DESCRIPTION
The column utility formats its input into multiple columns. Rows are filled before columns. Input is taken from file or, by default, from
standard input. Empty lines are ignored.
OPTIONS -c, --columns width
Output is formatted to a width specified as number of characters.
-t, --table
Determine the number of columns the input contains and create a table. Columns are delimited with whitespace, by default, or with
the characters supplied using the separator. Table output is useful for pretty-printing.
-s, --separator separators
Specify possible table delimiters (default is whitespace).
-o, --output-separator separators
Specify table output delimiter (default is two whitespaces).
-x, --fillrows
Fill columns before filling rows.
-h, --help
Print help and exit.
ENVIRONMENT
The environment variable COLUMNS is used to determine the size of the screen if no other information is available.
EXAMPLES
sed 's/#.*//' /etc/fstab | column -t
BUGS
The util-linux version 2.23 changed -s option to be non-greedy, for example:
$ printf "a:b:c
1::3
" | column -t -s ':'
old output:
a b c
1 3
new output (since util-linux 2.23)
a b c
1 3
SEE ALSO colrm(1), ls(1), paste(1), sort(1)HISTORY
The column command appeared in 4.3BSD-Reno.
AVAILABILITY
The column command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
util-linux October 2010 COLUMN(1)