how to separate numbers and words from a file using shell scripts


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers how to separate numbers and words from a file using shell scripts
# 1  
Old 06-26-2008
Question how to separate numbers and words from a file using shell scripts

Hi,

How to separate numbers and words(with full alphabets) in a particular file and store it in two different files.

Please help me out for this.Using shell scripting.


SmilieSmilie
# 2  
Old 06-26-2008
No duplicate or cross-posting, please read the rules.

Continue here:

https://www.unix.com/shell-programmin...ing-shell.html

Thread closed.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to grep a log file for words listed in separate text file?

Hello, I want to grep a log ("server.log") for words in a separate file ("white-list.txt") and generate a separate log file containing each line that uses a word from the "white-list.txt" file. Putting that in bullet points: Search through "server.log" for lines that contain any word... (15 Replies)
Discussion started by: nbsparks
15 Replies

2. Shell Programming and Scripting

Separate two numbers

I would like to separate number by space so that 121231212 222111212 would be 1 2 1 2 3 1 2 1 2 2 2 2 1 1 1 2 1 2 Thanks! (2 Replies)
Discussion started by: johnkim0806
2 Replies

3. Shell Programming and Scripting

Shell Scripts (Renaming file names with sequential numbers)

Hi there, Firstly, I have no experience with shell scripts so would really appreciate some help. I have the following shell script that is causing some problems: moveit() { && set -x if then DOUBLE_DELIVERY=$(grep... (6 Replies)
Discussion started by: thebeno
6 Replies

4. Shell Programming and Scripting

Calling DB user from separate file in Shell script

Hi All, I need to execute a SQL via shell script and i am connecting to Oracle DB by this way $USERNAME1/$PASSWORD1@$STRING1 and i need to get username, password and string from someother file stored in the Unix Directory. $Username, $Password and $String is stored in File A in Path A and i want... (3 Replies)
Discussion started by: sathish.tn
3 Replies

5. Shell Programming and Scripting

separate two numbers separated by :

Hi all i have a data of this form 10.12.4.22:138 10.12.2.50:137 10.20.2.24:1027 10.12.2.44:138 10.12.2.44:137 10.0.4.38:58871 10.13.3.19:138 i need to separate the number out which is at the last and after ':' Please help me out Thanx in advance (5 Replies)
Discussion started by: vaibhavkorde
5 Replies

6. Shell Programming and Scripting

separate numbers in a file

I have this command in a shl (UNIX) to find the lates file that start with EMT in a directory file=$(ls -tr $EMT*.dat | tail -1) # Select the latest file It finds: EMT345.dat then I have to be able to separate EMT AND the numbers 345 and stored 345 in a variable and incremented, so my new... (7 Replies)
Discussion started by: rechever
7 Replies

7. Shell Programming and Scripting

AWK to separate numbers from logs

Hello friends, Im trying to separate a number from a log, but it seems i need help here awk '/stimated/ {print $5}' mylog.txt gives (1515.45MB). i need pure number part to use in a comparision loop so i want to separate the number part (but only 1515 not 1515.45 ) awk '/stimated/... (6 Replies)
Discussion started by: EAGL€
6 Replies

8. Shell Programming and Scripting

To read and separate number and words in file and store to two new file using shell

hi, I am a begginer in unix and i want to know how to open a file and read it and separate the numbers & words and storing it in separate files, Using shell scripting. Please help me out for this. Regards S.Kamakshi (2 Replies)
Discussion started by: kamakshi s
2 Replies

9. Shell Programming and Scripting

How to parse large numbers of shell scripts

I am trying to parse hundreds of shell scripts to determine how they related to each other. Ideally for every script, I would get an output of: What other scripts it calls What files it reads Environment variables it accesses Any ideas on how to do this? TIA! (2 Replies)
Discussion started by: bliss
2 Replies

10. UNIX for Dummies Questions & Answers

Listing words from a file on a Separate Line

Hi, I want to list all the words in my file on a separate line. I am using the bourne(sh)/bourne again shell(bash). Thanks, theA (2 Replies)
Discussion started by: Astudent
2 Replies
Login or Register to Ask a Question