getting "ksh: no space"-error when running a unix command

Gaurav Parek

I have a text file WIDeletion2.txt whose sample text is as follows.

$ head WIDeletion2.txt
5A1E7DF7C1C8BC4497FE3AD68954EF21 VA_ITSHOME
294A07B8ABDC454FABD0CD488B3FA51B VA_ITSHOME
C15A689952E4A14993B4787020258AEA VA_ITSHOME
C3E8CFE6FFBD3A45B37336D270940AC8 VA_ITSHOME
F69955919630784EB41FE8D0BE2A260F VA_ITSHOME
DD044FFD70FDED46AEA9205DA3435B24 VA_ITSHOME
0C678B5BC6531140BE92F40A0B727012 VA_ITSHOME

It contains around 90k of lines like this. I want to add deletedwob at starting of each line and " y y" (without quotes) at the end of each line.

I am trying to achieve this doing the following (on AIX):

$ for i in `cat WIDeletion2.txt`
> do
> echo deletewob $i y y >> WIDeletion3.txt
> done
ksh: no space

I am getting a ksh: no space error. I have verified the space of /tmp as well. There is around 600mb of space available and the size of WIDeletion2.txt is as below.

$ ls -ltr WI*
-rw-rw-r--    1 fnsw     fnusr       3390146 Apr 10 10:50 WIDeletion2.txt

df for mount /tmp is:

$ df -m /tmp
Filesystem    MB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd3        1024.00    615.37   40%     1601     2% /tmp

So by adding those extra stuffs to file it can go to twice or thrice of its size which would be at max 20 mb and I have 600 mb space available. I even tried putting it in a script and then running the script which yields the same error. Any ideas why I am getting this error?

Brad Lanam

Your shell is running out of memory processing that loop. Try:

sed -e 's,^,deletedwob ,' -e 's,$, y y,' WIDeletion2.txt > WIDeletion3.txt

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Getting error when running the program

From Dev

WMI:Getting Invalid Class Error when running shell command through another program

From Dev

Why am I getting "permission denied" error message when running Linux find command

From Dev

Unix Running Tar Command

From Dev

Getting an error when running awk from a script

From Dev

Getting an error when running Rails server

From Dev

Error when running jekyll new command

From Dev

Error when running jekyll new command

From Dev

'command not found' error when running shell script

From Dev

Error when running bash command over ssh

From Dev

getting error when trying to execute an Sql command

From Dev

Running batch file from command prompt getting error

From Dev

Getting gcc command not found when running the Makefile on travis CI

From Dev

Getting the functionality of the scrapy crawl command when running a spider from a script

From Dev

Getting gcc command not found when running the Makefile on travis CI

From Dev

How to know, when a shell command running in the backround getting killed or died

From Dev

Getting the functionality of the scrapy crawl command when running a spider from a script

From Dev

command not found error on Mac when running mfp from command line

From Dev

Unix command error

From Dev

cp command unix error

From Dev

unix find command error

From Dev

Bash: Error when storing result of unix command to variable in while loop

From Dev

Getting the error "level sets of factors are different" when running a for loop

From Dev

Getting error when running grunt-contrib-imagemin

From Dev

Getting error when my python ddos script running

From Dev

getting no such file or directory error in phpExcel class when running example

From Dev

Why Am I Getting A Type Error When Running This Function?

From Dev

Getting error when my python ddos script running

From Dev

When running bash script that calls another script getting EOF error

Related Related

  1. 1

    Getting error when running the program

  2. 2

    WMI:Getting Invalid Class Error when running shell command through another program

  3. 3

    Why am I getting "permission denied" error message when running Linux find command

  4. 4

    Unix Running Tar Command

  5. 5

    Getting an error when running awk from a script

  6. 6

    Getting an error when running Rails server

  7. 7

    Error when running jekyll new command

  8. 8

    Error when running jekyll new command

  9. 9

    'command not found' error when running shell script

  10. 10

    Error when running bash command over ssh

  11. 11

    getting error when trying to execute an Sql command

  12. 12

    Running batch file from command prompt getting error

  13. 13

    Getting gcc command not found when running the Makefile on travis CI

  14. 14

    Getting the functionality of the scrapy crawl command when running a spider from a script

  15. 15

    Getting gcc command not found when running the Makefile on travis CI

  16. 16

    How to know, when a shell command running in the backround getting killed or died

  17. 17

    Getting the functionality of the scrapy crawl command when running a spider from a script

  18. 18

    command not found error on Mac when running mfp from command line

  19. 19

    Unix command error

  20. 20

    cp command unix error

  21. 21

    unix find command error

  22. 22

    Bash: Error when storing result of unix command to variable in while loop

  23. 23

    Getting the error "level sets of factors are different" when running a for loop

  24. 24

    Getting error when running grunt-contrib-imagemin

  25. 25

    Getting error when my python ddos script running

  26. 26

    getting no such file or directory error in phpExcel class when running example

  27. 27

    Why Am I Getting A Type Error When Running This Function?

  28. 28

    Getting error when my python ddos script running

  29. 29

    When running bash script that calls another script getting EOF error

HotTag

Archive