Sponsored Content
Top Forums Shell Programming and Scripting Getting phone number, its message and assigning them into 2 variables then screen output. Post 302682771 by testcase on Tuesday 7th of August 2012 12:14:16 AM
Old 08-07-2012
Quote:
Originally Posted by Chubler_XL
Try this:

Code:
awk 'p&&length{p=x;print}
/Remote number/{
   gsub(/.*Remote number : ./,"");
   gsub(/\".*/,"");print;p++}' RS= inbox.txt



Thanks for you reply but the result does not display phone number
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

assigning variables

Before I even attempt this, is it possible to grep for a pattern, maybe a partial sentence like "go to page 3", assign that to a variable and then use awk or something to pull out the 3 and assign it to a variable? So first I would have Gotopg = "go to page 3" then page = 3 (9 Replies)
Discussion started by: k@ssidy
9 Replies

2. Shell Programming and Scripting

Assigning nawk output to variables

I do a lot of command line scripting to capture data from files or other command output. I've checked in a number of Unix and scripting books but for the life of me I can't find out how to asign field data from nawk output into variables that I can manipulate later. For example, reading a two... (6 Replies)
Discussion started by: steveje0711
6 Replies

3. UNIX for Dummies Questions & Answers

assigning variables from standard output

What am I doing wrong? I was searching for the answer to assigning variables from output. I found this simple response ls -l apply_want.m | read perms links owner group size mtime1 mtime2 mtime3 file this should allow me to echo the variables echo "$perms | $links | $owner | $group |... (2 Replies)
Discussion started by: whamchaxed
2 Replies

4. Shell Programming and Scripting

variables not assigning in a function

Hi GUYS, I have function. I am assigning a line count to count variable. But it is throwing an error at this line. function_recur (){ #file being created in this function lenth = `wc -l function_outpu.dat`; echo $lenth; } this is the error i got rec.ksh: lenth: not found. ... (3 Replies)
Discussion started by: mac4rfree
3 Replies

5. Shell Programming and Scripting

Perl script :- Phone number validation

Hi All, I am doing a perl script validation for Phone numbers. The normal phone number format is 01-32145. I need to do two validations for the phone number 1) A valid phone number can have at least two digits as prefix and at least five digits as postfix. e.g. 01-01011 2) A... (5 Replies)
Discussion started by: subin_bala
5 Replies

6. Shell Programming and Scripting

Need help in assigning output of n commands to n variables automatically inside a for loop

Please help me to automatically assign the output of awk command to the variables cs3, cs4, cs5 and cs6 using a for loop. The below code is not working. for i in 3 4 5 6 do cs$i=`awk -F"|" 'BEGIN{sum=0}{sum=sum+$'$i'}END{printf("%d\n", sum)}' css` done echo $cs3 $cs4 $cs5 $cs6 (9 Replies)
Discussion started by: thulasidharan2k
9 Replies

7. Shell Programming and Scripting

Assigning variables

i have variables RECIPIENTS_DEVL,RECIPIENTS_UACC,RECIPIENTS_PROD i have a case statement to get the phase variable: case ${WMD_UPHASE1} in u) WMD_UPHASE4=UACC;; i) WMD_UPHASE4=DEVL;; p) WMD_UPHASE4=PROD;; d) WMD_UPHASE4=DEVL;; *) WMD_UPHASE4=DEVL;; esac I am unable to... (3 Replies)
Discussion started by: Arun Mishra
3 Replies

8. Shell Programming and Scripting

Editing phone number with multiple delimiters

Hello all I have a data base of information that is formatted like so: JSD4863 XXX-XX-XXXX DOE, JOHN C JR-II BISS CPSC BS INFO TECH 412/779-9445 I need the last four digits of the phone number. However, many lines contain 'garbage data' that I'm not interested in. So i used a 'for loop'... (7 Replies)
Discussion started by: smartSometimes
7 Replies

9. Shell Programming and Scripting

Assigning Variables

Hi, Can the below be clarified please. i just want to know what is the difference between the two ways of assigning variables as mentioned below. export SRC_TBL=${SRC_TBL-"MMA_COPAY_PLN_FACT_STG"} export SRC_TBL="MMA_COPAY_PLN_FACT_STG" thanks in advance :) Arun (1 Reply)
Discussion started by: Arun Mishra
1 Replies

10. Web Development

Auto phone number search

Hi. I want to search 10 phone numbers automatically in Facebook and store the result in some format. Can anyone help me with the script. I am using kali Linux. (2 Replies)
Discussion started by: looksthatmatter
2 Replies
AMORAD(8)						     A Remote Mobile Assistant							 AMORAD(8)

NAME
amorad - Amora (A Remote Mobile Assistant) daemon SYNOPSIS
amorad [options] DESCRIPTION
Amora is an application that enables you to control your PC desktop using a cellphone. It uses bluetooth to send mouse and keyboard events to the graphical session. With it you can control your slides in OpenOffice.org, movies or any other application. Amora also has a screen- shot feature, where you can see a thumbnail in the cellphone screen of the currently focused window in your desktop. The server (amorad) is written in C using Xlib and XTest to send events for X session and the POSIX socket API for I/O. It must be started by the user, inside a valid X session. OPTIONS
-h Help (usage) message -l Set a specific path for the log file -v Show program version and exit AMORA CLIENT
In order to use amora, you need a mobile phone with amora-client installed and running. The current client is implemented in Python for S60 (Nokia cellphones). BUGS
See the current bugs and open new ones in the project website. CREDITS
Author: Adenilson Cavalcanti da Silva Contributions from: Ademar de Souza Reis Jr., Alexis Younes, Thiago Marcos Santos, Wilson Prata and others; SEE ALSO
http://code.google.com/p/amora/ amorad manpage 2007-11-11 AMORAD(8)
All times are GMT -4. The time now is 07:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy