hi all
i'm really to this forum stuff and to scripting also...
my problem is when i'm using a foreach loop in csh a error is coming "too many words from " .....
this error comes when i run the loop more then 1800 times i think coz when i run it for less then 1800 or so it runs fine....
can anyone help me in that....
thanks in advance
If you will help us !! We help you
Can you provide some more info with example and code as well
~~~Sanjay Tripathi~~~
thanks for your reply !
foreach k (`cat /home/priyank/try_2/data3/date.txt`)# in this loop i'm opening a file which has 2000 dates in a coloun one by one and this shows hat error...
echo "$k" | awk -F'-' '{print $3"/"$1"/"$2}' >> /home/priyank/try_2/data3/cool.txt
end
Please read and understand what the man page says.
The man page description says the system limits argument list to 10240 characters. You say you have 2000 entries and assuming each date entry is of the form xx-xx-xx i.e. 8 characters, the argument list computes to atleast 2000 * 8 + 1999 * 1 (whitespace) characters. If my assumptions and calculations are right, then that number is way above 10240.
Anyways, why a for loop when awk alone can do it ? I think this should work as well.
Hi 2 all,
i have had AIX 7.2
:/# /usr/IBMAHS/bin/apachectl -v
Server version: Apache/2.4.12 (Unix)
Server built: May 25 2015 04:58:27
:/#:/# /usr/IBMAHS/bin/apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_worker_module (static)
... (3 Replies)
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)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
hello
I have a file of the form:
nameA number number ...
nameB number number ...
nameA number number ...
nameC number number ...
nameD number number ...
10
nameA number number ...
nameC number number ...
nameB number number ...
nameC number number ...... (4 Replies)
I am trying to find lines in a text file larger than 3 Gb that start with a given string. My command looks like this:
$ look "string" "/home/patrick/filename.txt"
However, this gives me the following message:
"look: /home/patrick/filename.txt: File too large"
So, I have two... (14 Replies)
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)
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)