Sponsored Content
Full Discussion: Split "-n" unknown option
Homework and Emergencies Emergency UNIX and Linux Support Split "-n" unknown option Post 302982393 by RudiC on Wednesday 28th of September 2016 02:05:16 PM
Old 09-28-2016
man split for split (GNU coreutils) 8.25 says

Quote:
-n, --number=CHUNKS
generate CHUNKS output files; see explanation below
.
.
.

CHUNKS may be:
N split into N files based on size of input
.
.
.
r/K/N likewise but only output Kth of N to stdout
What does your man split tell you about the -n option?
 

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

unknown error message "sh: No: not found"

I am getting this error message (sh: No: not found) and I have no idea what line in my unix script its coming from or what it means. Can anyone help? thanks, Cindy (2 Replies)
Discussion started by: cindytucci
2 Replies

2. Shell Programming and Scripting

read -p "prompt text" foo say "read: bad option(s)" in Bourne-Shell

Hallo, i need a Prompting read in my script: read -p "Enter your command: " command But i always get this Error: -p: is not an identifier When I run these in c-shell i get this error /usr/bin/read: read: bad option(s) How can I use a Prompt in the read command? (9 Replies)
Discussion started by: wiseguy
9 Replies

3. Shell Programming and Scripting

if returns "unknown test operator"

Greetings, using ksh on Solaris, I am trying to identify the current version of a package installed on multiple servers using if statement in a precursor to upgrading. I have searched the forums and have found many hits, reviewed 3 pages and have tried the different variations noted there. Also... (3 Replies)
Discussion started by: 22blaze
3 Replies

4. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

5. UNIX for Dummies Questions & Answers

What is the meaning of "-s" option in "if" statement?

Hi Guys, I'm sorry but I can't find answer for this, what is the meaning of -s option in "if" statement on unix scipting. Please see sample below: opath=/home/output for i in N1 N2 N3 N4 do echo $i if then grep $i $opath/N5_CRAI > $opath/N5_$i.crai chmod 777 $opath/N5_$i.crai ... (7 Replies)
Discussion started by: rymnd_12345
7 Replies

6. Red Hat

Sendmail saying "user unknown" after setting up MX

Hi Friends, I set up the sendmail in my perosnal home lab. I am using mutt to send the email in between the machines. Everything is working fine if i send email like <username>@<hostname>. Now i set up the MX record for my domain "home.com" and then i was trying to send the email to like... (2 Replies)
Discussion started by: Rohit Bhanot
2 Replies

7. Solaris

Unknown Disks "offline or reservation conflict"

Hi All, I am a RH Linux admin that recently started working at a company with a number of SUN Servers so it's been an interesting transition. Considering the last person left with very little documentation left behind so I have been picking up most issues half complete, or troubleshot. ... (7 Replies)
Discussion started by: MobileGSP
7 Replies

8. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
split(1)						      General Commands Manual							  split(1)

NAME
split - Splits a file into pieces SYNOPSIS
Current syntax split [-l line_count] [-a suffix_length] [file | -] [prefix] split -b n [k|m] [-a suffix_length] [file | -] [prefix] Obsolescent syntax split [-number] [-a suffix_length] [file | -] [prefix] STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: split: XCU5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. OPTIONS
Uses suffix_length letters to form the suffix portion of the file names of the split file. If -a is not specified, the default suffix length is two letters. If the sum of the prefix and the suffix arguments would create a file name exceeding NAME_MAX bytes, an error occurs. In this case, split exits with a diagnostic message and no files are created. Split a file into pieces n bytes in size. Split a file into pieces n kilobytes (1024 bytes) in size. Split a file into pieces n megabytes (1048576 bytes) in size. Specifies the number of lines in each output file. The line_count argument is an unsigned decimal integer. The default value is 1000. If the input does not end with a newline character, the partial line is included in the last output file. Specifies the number of lines in each output file. The default is 1000 lines per output file. If the input does not end with a newline character, the partial line is included in the last output file. (Obsolescent) OPERANDS
The pathname of the file to be split. If you do not specify an input file, or if you specify -, the standard input is used. DESCRIPTION
The split command reads file and writes it in number-line pieces (default 1000 lines) to a set of output files. The size of the output files can be modified by using the -b or -l options. Each output file is created with a unique suffix consisting of exactly suffix lowercase letters from the POSIX locale. The letters of the suffix are used as if they were a base-26 digit system, with the first suffix to be created consisting of all a characters, the second with b replacing the last a etc., until a name of all zs is cre- ated. By default, the names of the output files are x, followed by a two-character suffix from the character set as described above, starting with aa, ab, ac, etc., and continuing until the suffix zz, for a maximum of 676 files. The value of prefix cannot be longer than the value of NAME_MAX from <limits.h> minus two. If the number of files required is greater than the maximum allowed by the effective suffix length (such that the last allowable file would be larger than the requested size), split fails after creating the last possible file with a valid suffix. The split command will not delete the files it created with valid suffixes. If the file limit is not exceeded, the last file created contains the remainder of the input file and thus might be smaller than the requested size. EXIT STATUS
The following exit values are returned: Successful completion. An error occurred. EXAMPLES
To split a file into 1000-line segments, enter: split book This splits book into 1000-line segments named xaa, xab, xac, and so forth. To split a file into 50-line segments and specify the file name prefix, enter: split -l50 book sect This splits book into 50-line segments named sectaa, sectab, sectac, and so forth. ENVIRONMENT VARIABLES
The following environment variables affect the execution of split: Provides a default value for the internationalization variables that are unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization vari- ables contain an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string value, overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multibyte characters in arguments and input files). Determines the locale for the format and contents of diagnostic messages written to standard error. Determines the location of message catalogues for the processing of LC_MESSAGES. SEE ALSO
Commands: bfs(1), csplit(1) Standards: standards(5) split(1)
All times are GMT -4. The time now is 05:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy