Totally new to shell scripting


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Totally new to shell scripting
# 8  
Old 02-24-2014
So, it this what you want?

A full record will have signature,basic and trailer.

If there are 12 set of records in the input xml file, you need to separate them into 3 xml files each with 4 (=12/3) sets?
If there are 13 set of records in the input xml file, you need to separate them into 3 xml files, first xml with 5, second and third each with 4? or first and second with 4 and third with 5?

--ahamed
# 9  
Old 02-24-2014
43532

Last edited by risarose87; 02-25-2014 at 04:07 PM..
# 10  
Old 02-24-2014
first x records to first file
next y records to second file
final z records to third file
# 11  
Old 02-24-2014
So, how do you want to stack the records?

first rec to first file
second rec to second file
third rec to third file
fourth rec to first file
fifth rec to second file
and so on

or

first x records to first file
next y records to second file
final z records to third file

or

you just want records split across files but not in any specific order?

?

--ahamed

---------- Post updated at 11:43 AM ---------- Previous update was at 11:40 AM ----------

BTW where is your sample input xml?

Again, you said you wanted the signature and trailer as well along with basic right? So, this signature and trailer occur for every basic record or is it one per file?

--ahamed

Last edited by ahamed101; 02-24-2014 at 03:51 PM..
# 12  
Old 02-24-2014
sdfrd

Last edited by risarose87; 02-25-2014 at 04:08 PM..
# 13  
Old 02-24-2014
Can you please paste the sample xml?

--ahamed
# 14  
Old 02-24-2014
vfetg

Last edited by risarose87; 02-25-2014 at 04:08 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. IP Networking

Totally stucked in ssh port forwarding

Hello my friends , i am totally stuck in ssh port forwarding topic i had learn iptables and other networking topic without any problem but ssh port forwarding is headache 1. local port = what is this ? is this incoming traffic or outgoing traffic 2. remote port = same as above 3. dynamic... (2 Replies)
Discussion started by: rink
2 Replies

2. Web Development

Perl scripting or shell scripting?

i am going to study any one of the scripting languages mentioned above(shell 0r perl scripting) . Which is having more scope for a fresher? (1 Reply)
Discussion started by: Anna Hussie
1 Replies

3. What is on Your Mind?

Shell scripting vs Perl scripting

Hi all, I would like to start developping some good scripting skills. Do you think it would be best to start with shell scripting or Perl? I already got a fundation, really basics, in perl. but I am wondering what would be best to be good at first. Can you please help me determine which one to... (14 Replies)
Discussion started by: Pouchie1
14 Replies

4. Shell Programming and Scripting

Call Shell scripting from Perl Scripting.

Hi How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Discussion started by: anupdas
2 Replies

5. UNIX for Dummies Questions & Answers

Totally brand new to CRON

hi there i am very new to the world of CRON. i would like to know from below the ground up how i can learn abouot cron. where the best tutorials lie. i have an assignment that requires i set up a cron job to download a price file. am i in control of where the price file is downloaded to? (eg to... (2 Replies)
Discussion started by: buzzby
2 Replies

6. Shell Programming and Scripting

Sed if statement (totally stuck) apache

I have a irritating problem with a "if"-statement or what you should call it, in sed. I would love some help here since I am very, very stuck. I have this statement that I want to do: if line contains a: do this if none of the lines contained a: do this The problem with this... (8 Replies)
Discussion started by: hjalle
8 Replies

7. AIX

Totally messed up

I have moved the etc/passwd file and we are now unable to get in to Unix - any suggestions? (2 Replies)
Discussion started by: vbagwell
2 Replies

8. Shell Programming and Scripting

difference between AIX shell scripting and Unix shell scripting.

please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies

9. UNIX for Dummies Questions & Answers

totally new to unix

I'm trying to write a script, named "worfo" which will read a file in and return, on the screen, the number of words in the file. Also, I am looking to do several extras with this script. I need to allow it to accept the option "-n" which will use all non-alpha characters to delimit words. Also,... (2 Replies)
Discussion started by: adawg1283
2 Replies

10. UNIX for Dummies Questions & Answers

Totally new unix user

Hi, ive just been given a HP UX c180 to play with, along with a few external hd`s, can anyone recommend me a good place to start learning unix please as i havent got a clue what im doing when it comes to unix. Either web links or book recomendations would be great. I would like to set it up with... (1 Reply)
Discussion started by: Leviathan40
1 Replies
Login or Register to Ask a Question