so lets create a variable to test your requirements:
switch to ksh93, since ksh can't handle a for loop with a syntax like this:
this little script sets the variable CMD_ARGS to
gives you 19995 times a, so it's possible with read
the maximum size of command arguments on AIX, is set with the ncargs attribute, listed as option of sys0
default on my systems is 6, so you have 6x4k blocks=24k=24k characters
if I set the variable to 30k times a, I get the following error message, for every command I want to run:
set ncargs to 16 for example, then you wont have problems
and @ ak835:
from the man page of read:
Quote:
Description
The read command reads one line from standard input and assigns the values of each field in the input line to a shell variable using the characters in the IFS (Internal Field Separator) variable as separators. The VariableName
parameter specifies the name of a shell variable that takes the value of one field from the line of input. The first shell variable specified by the VariableName parameter is assigned the value of the first field, the second
shell variable specified by the VariableName parameter is assigned the value of the second field, and so on, until the last field is reached. If the line of standard input has more fields than there are corresponding shell
variables specified by the VariableName parameter, the last shell variable specified is given the value of all the remaining fields. If there are fewer fields than shell variables, the remaining shell variables are set to empty
strings.
to make sure, set the ifs to " ", before running the read command
Hi to everybody
i stuck on a simple thing i had a string and i want cut it , i try already few thing with the cut command but does not the way it should.
The script is in csh and running on AIX 4.3.2.0
here are few samples how the string can look like
FT71;1;1;1;;;1;31.01.2017... (9 Replies)
I need to search the file using strings "Request Type" , " Request Method" , "Response Type" and by using result set find the xml tags and convert into a single line?. below are the scenarios.
Cat test
Nov 10, 2012 5:17:53 AM
INFO: Request Type
Line 1.... (5 Replies)
I need to parse a huge file... with some strings like this:
<li class="website-feature"><a href="http://some.changingurl.com" ..(some changing classes)..>
I need to change the above to:
<li class="website-feature">http://some.changingurl.com<a href="http://some.changingurl.com" ..(some... (2 Replies)
am using AIX and I have a string "There is no process to read data written to a pipe". I want to get the output 2 lines before and 4 lines after this string. The string is present like more than 100 times in the log and I want to output, the last result in the log with this string
I tried using... (1 Reply)
Hi
When i copy 300GB of data from one filesystem to the other filesystem in AIX I get the error :
tar: 0511-825 The file 'SAPBRD.dat' is too large.
The command I used is :
# tar -cf - . | (cd /sapbackup ; tar -xf - )
im copying as root
The below is my ulimit -a output :
... (3 Replies)
How to search a string which has occured numerous times in a single row. I tried many options, I am facing issue with the file size. Anything I go for, it says it is huge.. File is 82MB.
Assume, the file contains the string 'Name' in many places.. Something Like below.
... (5 Replies)
Guys
Look at the following string....!!
/global/site/vendor/Vignette7/Content/7_5/java5/jre/bin/java -classpath /global/site/vendor/Vignette7/Content/7_5/lib/vgnconfiglauncher.jar -Dcom.vignette.jvmid=V7CDS1CA1 -DVgnStartupClass=com.vignette.config.agent.Agent... (15 Replies)
Hello Guys
/usr/local/sbin/sshd
I need to spilt such a line like this
Path to be set as :/usr/local/sbin
Command to be set as : sshd
What combination should i use?
Regards
Abhi (21 Replies)
Hi friends...
I am sending a file say xyz.xls to a mail through unix.
The .xls file is more than 65 thousand in size so I want to spilt the file size into 40 thousand and 25 thousand.
So can anyone provide any inputs.... (1 Reply)