Sponsored Content
Top Forums Shell Programming and Scripting String manipulation in a file Post 302388880 by ramse8pc on Thursday 21st of January 2010 05:57:58 PM
Old 01-21-2010
String manipulation in a file

I have a text file having number of different rows like this..
Action & Adventure|Whiteout|
Kids Free|PBS KIDS Sprout|En espanol|
Kids Free|PBS KIDS Sprout|En espanol|XYZ|


Basically,i want to read the file and write to another file in a tree structure like this..
each row should have 6 columns seperated by |

Action & Adventure||||||
Action & Adventure|Whiteout|||||
Kids Free|||||||
Kids Free|PBS KIDS Sprout|||||
Kids Free|PBS KIDS Sprout|En espanol||||
Kids Free|||||||
Kids Free|PBS KIDS Sprout|||||
Kids Free|PBS KIDS Sprout|En espanol||||
Kids Free|PBS KIDS Sprout|En espanol|xyz|||


sorry for the ambiguity.it's my bad. I have modified it now.

Please help me to write a script

Thaks in advance

Last edited by ramse8pc; 01-21-2010 at 08:27 PM.. Reason: Explained clearly
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

String manipulation

Hi all, Please help me decide this problem. I have a converter application getting its parameters by specified format. Ie: -date2007-02-14 Also I have a files named yyyyMMdd.rar format. So how do I convert the file name to it. Input: 20070214.rar Output: -date2007-02-14 I wrote the... (2 Replies)
Discussion started by: mr_bold
2 Replies

2. Shell Programming and Scripting

string manipulation

Hi, I have searched this long and hard and don't seem to see another post on this issue. I have two strings each with the same characters but in a different order. String1=”word” String2=”dwor” I want to test them to show their similarity. Unfortunately I can't do a sort so that they will... (9 Replies)
Discussion started by: Cactus Jack
9 Replies

3. UNIX for Dummies Questions & Answers

string manipulation

Hi, I have a file with rows of text like so : E100005568374098100000015667 D100005568374032000000112682 H100005228374060800000002430 I need to grab just the last digits(bolded) of each line without the proceeding text/numbers. Thanks (5 Replies)
Discussion started by: james6
5 Replies

4. UNIX for Dummies Questions & Answers

String manipulation

I am doing some training for a job I have just got and there is an exercise I am stuck with. I am not posting to ask a question about logic, just a trivial help with string manipulation. I would appreciate if somebody could at least give me a hint on how to do it. Basically, the intelligent part... (8 Replies)
Discussion started by: Dantastik
8 Replies

5. Shell Programming and Scripting

string manipulation

Hi all, see i have a script that takes few arguments. first one is command we do on file, next is file (mostly txt file with lot of data) third is destination where we do something with data in file. Since im new in scripting, and im learning as i go, i need some hint how to manipulate that... (3 Replies)
Discussion started by: ajemrunner
3 Replies

6. Homework & Coursework Questions

String Manipulation

Write a shell program to display the position of the right - most character in a given input string. Example : Input : RAHUL Output : L is in the 5th position also tell me how to count length of string and how to find the position of specific character in left most side. Homework... (0 Replies)
Discussion started by: shashwat2691
0 Replies

7. Shell Programming and Scripting

string manipulation

hi all, i am new to shell scripting and need help. i have a string that stores the month in Jan/Feb/Mar format. i need to convert it to number like 01 for jan, 12 for dec etc. i am using the following sed command, echo "Enter a Month eg. Jan/Feb : " read MONTHEND ... (9 Replies)
Discussion started by: anupom2000
9 Replies

8. Shell Programming and Scripting

Deleting part of a string : string manipulation

i have something like this... echo "teCertificateId" | awk -F'Id' '{ print $1 }' | awk -F'te' '{ print $2 }' Certifica the awk should remove 'te' only if it is present at the start of the string.. anywhere else it should ignore it. expected output is Certificate (7 Replies)
Discussion started by: vivek d r
7 Replies

9. Shell Programming and Scripting

Awk to convert a text file to CSV file with some string manipulation

Hi , I have a simple text file with contents as below: 12345678900 971,76 4234560890 22345678900 5971,72 5234560990 32345678900 71,12 6234560190 the new csv-file should be like: Column1;Column2;Column3;Column4;Column5 123456;78900;971,76;423456;0890... (9 Replies)
Discussion started by: FreddyDaKing
9 Replies

10. Programming

String Manipulation in a text file

Hi I have a requirement to write a script but not sure which is the best way to approach this I have not worked in sed but I'm aware that its robust for file extraction requirements I have a scripting task. I already developed the code in perl but the script is taking almost 2 mins for... (5 Replies)
Discussion started by: John Trevor
5 Replies
qenable(8B)								PBS							       qenable(8B)

NAME
qenable - enable input to a pbs destination SYNOPSIS
qenable destination ... DESCRIPTION
The qenable command directs that a destination should accept batch jobs. The qenable command sends a Manage request to the batch server specified by destination. If the command is accepted, the destination will accept Queue Job requests which specified the queue. In order to execute qenable, the user must have PBS Operation or Manager privilege. OPERANDS
The qenable command accepts one or more destination operands. The operands are one of three forms: queue @server queue@server If queue is specified, the request is to enable that queue at the default server. If the @server form is given, the request is to enable all the queues at that server. If a full destination identifier, queue@server, is given, the request is to enable the named queue at the named server. STANDARD ERROR
The qenable command will write a diagnostic message to standard error for each error occurrence. EXIT STATUS
Upon successful processing of all the operands presented to the qenable command, the exit status will be a value of zero. If the qenable command fails to process any operand, the command exits with a value greater than zero. SEE ALSO
pbs_server(8B), qdisable(8B), and qmgr(1B) Local qenable(8B)
All times are GMT -4. The time now is 01:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy