Sponsored Content
Top Forums Shell Programming and Scripting Ignore the 255 character limit of command line Post 302574707 by agentgrecko on Friday 18th of November 2011 05:55:46 AM
Old 11-18-2011
Ignore the 255 character limit of command line

Hi

I would just like to ask if there is a way for UNIX to ignore/overcome the 255 character limit of the command line?

My problem is that I have a really long line of text from a file (300+ bytes) which i have to "echo" and process by adding commands like "sed" to the end of the line, like the following:

Code:
echo "xxx really long line of text xxx" | sed -e s/xxx/yyy/g

I have read in here that there are character limits (depends on system), and tested the system I'm using and indeed, it can only process commands not exceeding 255 chars. Have also read on changing the values of ARG_MAX (limits.h) but unfortunately, my access has no permission on changing those values.

Is there a way to overcome this limit without changing system parameters? Like setting a temp buffer for the string of text/commands?

Appreciate any feedback, thanks.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Command line buffer limit?

Is there a limit (255 chars?) on the command line?? I'm trying to copy some generated java & class files from one dir to another and ID the old & new versions by: find . -name FFSFIXADminCallbackBean.java I then do a copy and paste of the source and target - $ cp -p source target It... (7 Replies)
Discussion started by: kornshellmaven
7 Replies

2. Shell Programming and Scripting

How do I ignore one character in a case statement? PLEASE HELP!

Hello, I am new to this forums. I need help with shell, and ksh in particular. I have a case statement that does something if -k. So it looks like: case $arg in -k) PUT=y, SEND=1 Thats all good and dandy. But now I want to change it where whether or not the user puts -k or not, it will do... (2 Replies)
Discussion started by: cpunisher
2 Replies

3. UNIX for Dummies Questions & Answers

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

4. Shell Programming and Scripting

echo !SR | nc 255.255.2.2 80 - how to in XP?

Hi guys I am trying to interface with an old industrial scanner through an old PC with an old network card and a copy of Linux. It now needs to speak to a Windows XP machine, but I have no idea what the Windows equivalent of these functions would are: echo !1 | nc 255.255.2.2 80 echo ?2 | nc... (3 Replies)
Discussion started by: TonyG
3 Replies

5. Solaris

8 character limit for ipcs command , any way to increase # of chars ?

Hello All, We have a working script which identifies and kills ipcs resources which havent been correctly killed during normal shutdowns. It is working fine and dandy however there are some issues now. Environment: SunOS 5.10 Generic_148888-03 sun4u sparc SUNW,SPARC-Enterprise ... (4 Replies)
Discussion started by: icalderus
4 Replies

6. Shell Programming and Scripting

Grep command to ignore line starting with hyphen

Hi, I want to read a file line by line and exclude the lines that are beginning with special characters. The below code is working fine except when the line starts with hyphen (-) in the file. for TEST in `cat $FILE | grep -E -v '#|/+' | awk '{FS=":"}NF > 0{print $1}'` do . . done How... (4 Replies)
Discussion started by: Srinraj Rao
4 Replies

7. Shell Programming and Scripting

sed 255 Character Limitation

Hello, I am using sed command to place a comma dynamically in certain positions. When the position variable exceeds 255 characters, it errors out. I would appreciate if someone can point in the correct direction sed 's/^\(.\{'"$pos"'\}\)./\1,/' ragha.txt > ragha3.txt If $pos > 255,... (8 Replies)
Discussion started by: ragha81
8 Replies

8. UNIX for Beginners Questions & Answers

Spliting a line after 255 characters.

Hi Guys, I have a file which contains multiple lines. I need to split each line 255 characters and then I need to add call statement in the front and semi colon at the end. I/P: call sp_rebuildindex('aaa.aaa','column column column column column column column column column column ... (4 Replies)
Discussion started by: Booo
4 Replies

9. UNIX for Beginners Questions & Answers

How to put a 80 character limit on a long topic line in markdown?

I have a topic line in markdown that spans more than 80 characters that i need to add a line break. Markdown is simply treating the line break as a brand new line instead of continuing as a topic line. Eg: # This is a very long line Markdown interprets it as This is a very long line (4 Replies)
Discussion started by: dragonpoint
4 Replies

10. UNIX for Beginners Questions & Answers

Single line archive log files command if exceed certain limit in Linux

Hello Guys, Is there a single line archive command to zip or tar log files which is larger than certain size limit ? Do let me know if there is any. Thanks (7 Replies)
Discussion started by: UnknownGuy
7 Replies
WARNQUOTA.CONF(5)                                               File Formats Manual                                              WARNQUOTA.CONF(5)

NAME
warnquota.conf - configuration for warnquota SYNOPSIS
/etc/warnquota.conf DESCRIPTION
The warnquota.conf file stores a configuration for warnquota(8) tool which is used to notify a user or a group who exceeds its disk quota limits. The syntax is an option name followed by an equal sign and the option value. White space characters surrounding the option names and val- ues are allowed. Empty lines or lines starting with a hash sign or a semicolon are ignored. An option value can but does not have to be quoted. The value can span across multiple lines provided each previous line ends with a back- slash. Some option values can contain formatting sequences which will be expanded to their respective values. Following sequences are recognized: %d domain name %h host name %i, %s user or group name %% literal % character | new-line character OPTIONS
CC_BEFORE Send to copy-carbon address only when a user has less than specified grace time left. Value is a number followed by a time unit. Known units are seconds, minutes, hours, and days. Example: 5 days CC_TO An e-mail address to put into copy-carbon (CC:) recipient header. Default value is root. CHARSET Defines character set for sent e-mails. Default value will be current locale character set used when executing warn- quota command, if locale is not either C or POSIX. Otherwise no character set will be specified in the e-mails. FROM Defines From: e-email address. Default value is support@localhost. GROUP_MESSAGE A text sent as an e-mail body if a group exceeds its limits. This option recognizes formatting sequences. GROUP_SIGNATURE A signature text appended to notification for a group. Default value is a general explanation utilizing SUPPORT and PHONE values. This option recognizes formatting sequences. LDAP_BASEDN Base distinguished name for LDAP queries. LDAP_BINDDN Bind distinguished name for LDAP queries. LDAP_BINDPW Bind password for LDAP queries. LDAP_DEFAULT_MAIL_DOMAIN Default e-mail address domain of searched user if given LDAP attribute does not specify any. LDAP_HOST LDAP server name to connect to if LDAP_URI is not defined. LDAP_MAIL A boolean controlling if LDAP has to be used to look up user's e-mail address. Possible values are true and false. Default value is false. LDAP_MAIL_ATTRIBUTE The LDAP attribute which holds user's e-mail address. LDAP_PORT LDAP server port number to connect to if LDAP_URI is not defined. LDAP_SEARCH_ATTRIBUTE The LDAP attribute which holds user's ID to look up. LDAP_URI The URL of LDAP server to use to search user's e-mail addresses. This option takes preference over LDAP_HOST and LDAP_PORT. Example: ldaps://example.com:389/ MESSAGE A beginning of text sent as an e-mail body if a user exceeds his limits. This option recognizes formatting sequences. MAIL_CMD The command to execute to send an e-mail. The e-mail text including all headers is passed to the standard input of the command. Default value is /usr/lib/sendmail -t. MAILDEV The device with disk quotas to exclude from sending notifications if there are exceeded limits. This option should identify the device where mail boxes are stored to prevent from bouncing the warnquota notification by local MDA due to no space for storing new e-mails. Special value any denotes all devices. PHONE The telephone contact to the user support. Default value is (xxx) xxx-xxxx or (yyy) yyy-yyyy. SIGNATURE The end of e-mail body if a user exceeds its limits. Default value is a general explanation utilizing SUPPORT and PHONE values. This option recognizes formatting sequences. SUBJECT The text to put into Subject: header. Default value is Disk Quota usage on system. SUPPORT The contact to the user support. Default value is support@localhost. EXAMPLE
# comment FROM = root@example.com SUPPORT = support@example.com PHONE = 1234 FILES
/etc/warnquota.conf configuration for warnquota(8) SEE ALSO
warnquota(8). WARNQUOTA.CONF(5)
All times are GMT -4. The time now is 01:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy