SED on AIX Limitation


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting SED on AIX Limitation
# 8  
Old 02-10-2011
If the values of the array SEPARADORES are the positions of the semicolon, you can create a file with the the values of the array SEPARADORES separated by spaces and run the awk command.

The file SEPARADORES_file should looks like:
Code:
14 21 31 41 ... 1848 1889 1892

Code:
awk 'NR==FNR{c=split($0,a); next} {
  s=substr($0,1,a[1])
  for(i=2;i<=c;i++) {
    s=s ";" substr($0,a[i-1]+1,a[i]-a[i-1])         
  }
  s=s ";" substr($0, a[c]+1)
  print s
}' SEPARADORES_file main_file

This User Gave Thanks to Franklin52 For This Post:
# 9  
Old 02-11-2011
Hi, I am now with another problem and I can not prove that mentioned.

As do I comment, but thank you very much for helping me
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

AIX lpar bad disk I/O performance - 4k per IO limitation ?

Hi Guys, I have fresh new installed VIO 2.2.3.70 on a p710, 3 physical SAS disks, rootvg on hdisk0 and 3 VIO clients through vscsi, AIX7.1tl4 AIX6.1tl9 RHEL6.5ppc, each lpar has its rootvg installed on a LV on datavg (hdisk2) mapped to vhost0,1,2 There is no vg on hdisk1, I use it for my... (1 Reply)
Discussion started by: frenchy59
1 Replies

2. 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

3. AIX

What is the limitation in AIX?

Hi All, i got few questions... 1) What is the maximum number of files that we can save under a single directory in AIX ? (* we have enough storage/disk space) 2) And what is the maximum number of sub - directories in side a directory? I know that...every directory is a (special)... (11 Replies)
Discussion started by: System Admin 77
11 Replies

4. UNIX for Dummies Questions & Answers

Limitation in addition

whats wrong with this addition? Whats the maximum number of digits can be handled? pandeeswaran@ubuntu:~/Downloads$ const=201234454654768979799999 pandeeswaran@ubuntu:~/Downloads$ let new+=const pandeeswaran@ubuntu:~/Downloads$ echo $new -2152890657037557890 pandeeswaran@ubuntu:~/Downloads$ (4 Replies)
Discussion started by: pandeesh
4 Replies

5. AIX

Limitation for SFTP on AIX number of sessions

Hello. I am using AIX 6 and If wish to receive more than 500 files via SFTP, I get some time out errors. Could you please advise where is the limit for number of concurrent transfers setup in AIX Box or what is the limit and can that be changed? Many Thanks (3 Replies)
Discussion started by: panchpan
3 Replies

6. AIX

AIX 5.3 : Limitation to 1 telnet session for some users

Hi, I search the way to limit, for a group on a AIX 5.3, one telnet session by user (Simultaneous). I search a lot in /etc/security but the only way found is with the pam authentication that i not use. No solution found also in smit menu... Thanks for your help. (2 Replies)
Discussion started by: feilong
2 Replies

7. Shell Programming and Scripting

sed limitation of 255 characters

Gurus, sed -e "s/\(.\{1,255\}\)\(.\{1,2\}\)\(.*\)/\1AB\3/" FILE ---this works sed -e "s/\(.\{1,468\}\)\(.\{1,2\}\)\(.*\)/\1AB\3/" FILE ---this does not It works only till 1,255 ( any number below 255 works) Any one know how to increase this limit. Thanks Sirababu (4 Replies)
Discussion started by: sirababu
4 Replies

8. UNIX for Dummies Questions & Answers

grep limitation

Hello, I am looking for a way to get around an issue, as I am using the grep command in a very common situation: grep ^50 File.*.txt | "some awk process" My problem is that bash throws me an error on the grep command if the directory in question contains several thousands files. ... (6 Replies)
Discussion started by: Indalecio
6 Replies

9. HP-UX

HP-UX 11i - File Size Limitation And Number Of Folders Limitation

Hi All, Can anyone please clarify me the following questions: 1. Is there any file size limitation in HP-UX 11i, that I can able to create upto certain size of file (say 2 GB) and not more then that???? 2. At max. how many files we can able to keep inside a folder???? 3. How many... (2 Replies)
Discussion started by: sundeep_mohanty
2 Replies

10. Shell Programming and Scripting

find limitation

Hi , i'm trying to use "find "command with "-size "option but i encounter 2gb file limitation. Can you confirm this limitation ? Is there a simple way to do the same thing ? My command is : <clazz01g-notes01>/base/base01 # find /base/base01 -name '*.nsf' -size +5242880000c -exec ls... (2 Replies)
Discussion started by: Nicol
2 Replies
Login or Register to Ask a Question