I'm trying to crudely hack my way through some data processing.
I have file.txt with around 17,000 lines like this:
The first column corresponds to file names, the second to line numbers. I am running this code to generate the text of a command that I need to execute for each of these lines (I don't think the code matters for this question but just in case...).
When I try to run these commands using xargs
it works for a small number of lines (i.e. the head -5 term). But when I try to run it on the entire file I get the error:
I also tried saving the commands as a file (commands.txt) using the above script, then executing using a while loop
But I get the error like this for each command:
Any ideas how I can get this done?
EDIT: I realized I can get this done using source but I'm still interested to know what's wrong with the above approaches.
Last edited by pathunkathunk; 04-26-2014 at 01:41 AM..
Reason: solution found
First I would like to thank this forum for assisting me in setting up my 1st sunbox.
Could not have done it if it had not been for you guys and google :D
I have mirrored my box and have SUCCESSFULLY tested booting from the rootdisk and rootmirror successfully.
I am now looking at configuring... (2 Replies)
I want to write a script which will check the arguments and if there is a single space(if 2 more more space in a row , then do not touch), replace it with _ and then gather the argument
so, program will be ran
./programname hi hello hi usa now hello hello
so, inside of program,... (7 Replies)
Hello,
i am using Solaris 10, The sar running in my system might be corrupted, but not sure why as there has been no updates to it ( to the best of my knowledge) and it was working fine until few days back. If i try to get sar reports using sar -o <filename> 60 180
there is no error but the... (2 Replies)
Hi,
When I execute one of my shellscript I am getting the below mentioned error message .This application takes 2input files which have the records counts 26463 and 1178046
exec(2): insufficient swap or memory available.
exec(2): insufficient swap or memory available.
exec(2):... (2 Replies)
Hi,
When I execute one of my shellscript I am getting the below mentioned error message .This application takes 2input files which have the records counts 26463 and 1178046
exec(2): insufficient swap or memory available.
exec(2): insufficient swap or memory available.
exec(2): insufficient swap... (3 Replies)
Hello,
I have some Fortran code that is providing the following error:
At line 1165 of lapc_shells_2.f
Fortran runtime error: Insufficient data descriptors in format after reversion
Here are the lines just above and including 1165:
WRITE (*,"('ATTEMPTING TO READ PLATE... (1 Reply)
Hi All,
I am running the script
VBoxManage list vms |sed 's/"//g' | cut -d " " -f1 > har1out.mytxt
result=`cat har1out.mytxt | grep $1'
echo $result
echo $1
{
if
then
echo pass
else
echo fail
fi (2 Replies)
Hi All,
I am using svnnotify (which is available on net) script to send svn commit notification.
Everything was working fine up to yesterday but from yesterday i started seeing error.
29CD01FCE44 7228 Thu Apr 5 11:11:51 apache@vm0001.host.com
(host mail.mailserver.com said: 452... (6 Replies)
Hi,
I want to capture space as well from the argument
eg:
script.ksh -m "Message from xyz" -e "email@xyz.com"
script.ksh -m 'Message from xyz' -e 'email@xyz.com'
I am parsing using getopts, but for option "m" OPTARG is returning only "Message".
Please use code tags next time for... (9 Replies)
Hello. There is my one-liner to get subjects of potential spam mails
sudo exiqgrep -bf "spamer@example.com" |cut -d' ' -f1 |xargs -I ~ sudo /usr/sbin/exim -Mvh ~ |grep 'Subject: '
I want to insert blank line after each iteration to make output more readable. I tried
sudo exiqgrep -bf... (1 Reply)