03-28-2011
Quote:
Originally Posted by
shamrock
cat's behavior can be altered by supplying cmd. line flags so why would it read in chunks...
Because it usually doesn't need to care about line boundaries. Stopping in the middle of a line won't make it "binary". (though cat without parameters ought to be binary-safe.) What blocks it does I/O in won't change the content of said I/O, a line too long for the block will just take a couple blocks to finish.
This User Gave Thanks to Corona688 For This Post:
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
how do you show just the used disk space. using the cut and df command?? or does anyone have any other suggestions on how to do it a better way? (3 Replies)
Discussion started by: rookie22
3 Replies
2. Shell Programming and Scripting
Hi,
I want to cut from a particular position to a particular position and retain the rest.
I tried this
cut -c31-51 file1.txt > file2.txt
But The characters from the position 31 to 51 were only present in file2.txt.
Is there a way to reverse this i.e to retain the rest except from... (1 Reply)
Discussion started by: ragavhere
1 Replies
3. Shell Programming and Scripting
Gurus,
I need help with the cut command :
I have a file with garbage charaters at the beginning of each record; but these characters are not of the same length;
First record has 3 garbage chars to be removed; rest have 2;
If the length was consistent across all the records, I could have... (3 Replies)
Discussion started by: tru_tell
3 Replies
4. Shell Programming and Scripting
Hi
Can anyone what I am doing wrong while using cut command.
for f in *.log
do
logfilename=$f
Log "Log file Name: $logfilename"
logfile1=`basename $logfilename .log`
flength=${#logfile1}
Log "file length $flength"
from_length=$(($flength - 15))
Log "from... (2 Replies)
Discussion started by: dgmm
2 Replies
5. UNIX for Dummies Questions & Answers
hay
i am trying to get JUST the PID from the ps command.
my command line is:
ps -ef | grep "mintty" | cut -d' ' -f2
but i get an empty line. i assume that the delimiter is not just one space character, but can't figure out what should i do in order to do that.
i know i can use awk or cut... (8 Replies)
Discussion started by: ran ber
8 Replies
6. Shell Programming and Scripting
hi,
i have a file
abc,"an,ab",cde,efg
abc,anab,cde,efg and need to cut the second field so the output should be abc,cde,efg and i have used cut -d',' -f1-1,3- but its giving me
abc,ab",cde,efg
abc,cde,efg (4 Replies)
Discussion started by: ATWC
4 Replies
7. UNIX for Beginners Questions & Answers
I'm a complete beginner in UNIX (and not a computer science student either), just undergoing a tutoring course. Trying to replicate the instructions on my own I directed output of the ls listing command (lists all files of my home directory ) to My_dir.tsv file (see the screenshot) to make use of... (9 Replies)
Discussion started by: scrutinizerix
9 Replies
8. Shell Programming and Scripting
VARIABLE="jhovan 5259 5241 0 20:11 ? 00:00:00 /proc/self/exe --type=gpu-process --channel=5182.0.1597089149 --supports-dual-gpus=false --gpu-driver-bug-workarounds=2,45,57 --disable-accelerated-video-decode --gpu-vendor-id=0x80ee --gpu-device-id=0xbeef --gpu-driver-vendor... (3 Replies)
Discussion started by: SkySmart
3 Replies
9. Shell Programming and Scripting
im currently running the following command to grab all arguments in front of a script, directly from the process table.
# cat /tmp/allmyprocs
ubuntu 9933 27793 0 03:29 pts/0 00:00:00 /bin/sh ./prying.sh
ubuntu 9941 9933 0 03:29 pts/0 00:00:00 sh
ubuntu 9952 9941 0 03:29... (1 Reply)
Discussion started by: SkySmart
1 Replies
LEARN ABOUT DEBIAN
mcxconvert
mcx convert(1) USER COMMANDS mcx convert(1)
NAME
mcx convert - convert between mcx storage types
SYNOPSIS
mcx convert <matrix-file-in> <matrix-file-out>
mcx convert [--write-binary] --cone-to-stack <cat-file-in> <cat-file-out>
mcx convert [--write-binary] --stack-to-cone <cat-file-in> <cat-file-out>
mcxconvert is not in actual fact a program. This manual page documents the behaviour and options of the mcx program when invoked in mode
convert. The options -h, --apropos, --version, -set, --nop, -progress <num> are accessible in all mcx modes. They are described in the mcx
manual page.
mcx convert [--cone-to-stack (transform cone file to stack file)] [--stack-to-cone (transform stack file to cone file)] [--write-binary
(output native binary format)] [--cat (read and write cat format)] [-cat-max <num> (limit the stack conversion to <num> matrices)]
In the two-argument invocation without additional arguments, mcx convert converts from the format found in the first file to the other for-
mat, i.e. from native interchange to native binary format or the other way around. When querying with the -q option, mcx{convert} will out-
put a one-line synopsis describing the matrix in the argument. The --cone-to-stack and --stack-to-cone options convert between the two types
of concatenated output provided by mclcm.
DESCRIPTION
The mcl libraries make extensive use of matrices. Matrices are used to encode graphs, matrices and clusterings. They can be stored either
in interchange or in binary format. The latter is somewhat more efficient in storage and much faster in both reading and writing, but the
default is interchange format.
The mcl input routines recognize the type of storage they are dealing with. If you want to convert a matrix to the other storage type, sim-
ply specify the file name of the matrix you want to convert. mcx convert will recognize its type, and write the other type to the file
specified as the second argument.
OPTIONS
--cone-to-stack (transform cone file to stack file)
This option requires two trailing options, the names of respectively the source cone file and the target stack file.
--stack-to-cone (transform stack file to cone file)
This option requires two trailing options, the names of respectively the source stack file and the target cone file.
--cat (read and write cat format)
-cat-max <num> (limit the stack conversion to <num> matrices)
--write-binary (output native binary format)
This option is only useful with either of the options --cone-to-stack, --stack-to-cone, or --cat.
AUTHOR
Stijn van Dongen.
SEE ALSO
mcxio(5), and mclfamily(7) for an overview of all the documentation and the utilities in the mcl family.
mcx convert 12-068 8 Mar 2012 mcx convert(1)