Totally new to shell scripting

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Totally new to shell scripting
# 29  
Old 02-25-2014
i have to merge all 3 files at the end into a flat file. so the final basic record count should go back to 82 when merged back together.

---------- Post updated at 04:10 PM ---------- Previous update was at 04:05 PM ----------

I have to merge the three back into 1 flat file and with merging it back the count of total records should go back to the original number
# 30  
Old 02-25-2014
Originally Posted by risarose87
i have to merge all 3 files at the end into a flat file. so the final basic record count should go back to 82 when merged back together.

---------- Post updated at 04:10 PM ---------- Previous update was at 04:05 PM ----------

I have to merge the three back into 1 flat file and with merging it back the count of total records should go back to the original number
The cat utility will not strip out the extra headers and trailers and it will not recompute the <Basic-Record-Count> tag data.

Why did you want to add headers and trailers into the split files if all you were going to do was to put the split files back into a single XML file?
# 31  
Old 02-25-2014
it cuts the run time down on the actual xml file thats what the split was for so once it all runs it comes back together

---------- Post updated at 04:30 PM ---------- Previous update was at 04:21 PM ----------

when I use the

command it brings only one pair of the header, signature and trailer, it's just giving me back the wrong total.
# 32  
Old 02-25-2014
That can't be right. Don't the individual files have their own headers/signature and trailer?

# 33  
Old 02-25-2014
Moderator's Comments:
Mod Comment So, 27 messages into this thread, you're now telling us that you need two scripts: one to split a single XML file into multiple XML files, an another one to merge two or more XML files into a single XML file???

Worse than that, you have stripped out the entire description of the XML format these script are supposed to process and you have stripped out the sample code you provided on which those of us trying to help you based our code.

Anyone trying to read this (very lengthy) thread now has no way to figure out what is going on. This makes this thread useless to other forum readers trying to learn from the work we're doing for you.

Under these conditions, I no longer have any reason to continue participating in this discussion.
# 34  
Old 02-25-2014
I forgot about the merge and that was a over look. I thought I was done and forgot about that so I am sorry for now just mentioning that. I had done that because there was information from a message I recieved that I shouldn't have displayed and didn't want it public.
Moderator's Comments:
Mod Comment For threads in these forums to be useful to the general public, a clear description of the problem to be solved, including the formats of input and output files must be given. Samples of the desired input and output are required, and if it isn't obvious from the sample data, a description of the algorithms used to transform the input to the output is also required.

When you first posted your sample data, it contained company private names, addresses, phone numbers, and employee IDs of some of your company's employees and names, phone numbers, addresses, and customer IDs for some of your customers. A moderator spent about an hour expunging private data from that post for you and sent a private message suggesting that you be careful when posting sample data in the future. We hadn't noticed that you had gone back and removed the data (and all descriptions of the data format and all of the sample code that had been used to prepare code to meet your original problem.

Please restore enough of the deleted data and code to make the purpose of this thread clear! If that hasn't happened within 24 hours, this thread will be closed and you will be limited to read-only access to the forums for two weeks.

Don Cragun

Last edited by Don Cragun; 02-25-2014 at 07:55 PM.. Reason: Note need to maintain purpose of a thread and request reinstatement of crucial thread history.
# 35  
Old 02-26-2014
Moderator's Comments:
Mod Comment As has been said before, removing all visible statements describing what you wanted to be done, removing all descriptions of the desired input file format, and the output file format have made this thread useless.

The submitter was given 24 hours to restore enough of the history that were removed but chose not to restore any of the removed text.

The thread is now closed and the submitter has been placed on read-only status for about two weeks.

Before starting any new threads, please remember that the volunteers who respond to requests posted on The UNIX & Linux Forums are trying to help you and hundreds of other members learn how to effectively use the tools available on UNIX and Linux systems to perform tasks. The history provided in these threads of discussion help other users to learn how to use these tools to perform similar tasks.
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