Need some help in formatting answer of shell script
Dear all,
I am new to shell scripting and have tried to make a small program for fun sake that tells age from the last number of cell phone and birth year.
At the end we get a final 3 digit number and the first digit represents the last digit of cell phone and rest 2 numbers shows age. eg. 423 ---> 4 being the last digit of the cell number and 23 is the age.
Now i want to format the answer in such a manner that i can filter out the first digit and only display the last two digits as age.
The following is the script:
I would request forum members to help me on this... i have enjoyed this and want to explore more.
Thanks in advance.
stg44
Last edited by Franklin52; 07-16-2014 at 04:19 PM..
Reason: Please use code tags
I have a file with the below lines
1521
1522
1523
1524
1525
1526
...
174 lines all numbers like above. I want the above file to appear as below.
1521,1522,1523,1524.....
All the numbers should be separated by comma.
Pls tell me how to do this ....
Thanks in advance. (8 Replies)
Hi,
Can anybody throw somelight on how to handle date in a shell script?
I need to pass the date in this format 'yymmdd' and then pad it to a file.
The way in which i've handled is given below, but the date is not getting passed rather the file is getting created with a null date. Any... (2 Replies)
Hi,
I'm writing a script that calls a function to generate a certificate. In generating this certificate, I'm asked a series of questions. I was wondering, is there a way to pre-program my script to answer these questions in the same way all the time. I saw something like
EOF>>
y
EOF
... (4 Replies)
Hi
I have to do the following.I have to format a file test.t
The contents are
# Header 1231
xyz
asdf
asdapsdcsd
//string1 = "pqrs"
//string1 = "abcd"; //info
//string1 = "*pqrs"; //add
string1 = "#123"; //sub
//string1 = "#1234567890"
data = check(string1)
//string1 = "#1234567890"... (12 Replies)
First off, I am using Mac OS X, with Apple Remote Desktop.
I have to install several app's on teachers' laptops which are on several cd's that I have made disk images of. (DMG's)
To do rollouts quicker, I have written a script to mount the disk images and running the installers inside each of... (4 Replies)
I have a text file in the following format. can any one please help me in printing the output in userfriendly format mentioned below.
Input.
1) /ss/abc/1/w/s/domainname/abc1/logname/
########error###################
########error###################
########error###################... (2 Replies)
there is one shell which calls for different sql scripts.
output of different are formatted in frame like structure.i want columnar wise formatting to be done in such a manner that output of one sql may be comon input of rest sqls .
ERC DML
Closure Date
ER DML
SAP Transfer Date
... (0 Replies)
Hi Team,
We have a requirement where we need to format input file using shell script by meeting the below conditions.
1. 1. Ignore first 549 characters of that file.
2. 2. After that we need to make a file of 100 characters per line, repeat it until the 3rd ... (16 Replies)
Hi,
Please find the below lines of a file
B1/OT "GIB10" 837 130308 1351 MONORONOUS DIGI PATH FAULT SUPER
B1/OT "GIB10" 520 130418 1537 MONORONOUS DIGI PATH FAULT SUPER
B1/XT "GIB10" 762 130421 0653 TV Y-CEIVER ADMIN RXOCF-62 241_OKEBOLE_NEW 1
B1/XT "GIB10" 385 130425 1931 TV Y-CEIVER... (2 Replies)
Discussion started by: Ardhendu
2 Replies
LEARN ABOUT DEBIAN
vm
VM(1) mgetty VM(1)NAME
vm - VoiceModem is the program for handling the voice modem functionality from shell scripts
ACTIONS
beep options [<frequency [<length in 0.001sec>]]>
diagnostics options device name (e.g. ttyS2
dial options phone number
help
play options [<file names]+>
record options file name
shell options [<shell script [shell options]]>
wait options [<time in seconds]>
devicetest
OPTIONS -c n use compression type n
-d n set i/o device
-t, -m, -i, -e, -s, -H equals to -d <2,3,4,5,6,7>
-l s set device string (e.g. -l ttyS2:ttyC0)
-v verbose output
-w use off / on hook signal from local handset to start and stop recording
-x n set debug level
-L n set maximum recording length in sec
-P print first DTMF tone on stdout and exit
-R read and print DTMF string on stdout and exit
-S s set default shell for shell scripts (e.g. -S /bin/sh)
-T n set silence timeout in 0.1sec
-V n set silence threshold to <n> (0-100%%)
SEE ALSO vgetty(1)POD ERRORS
Hey! The above document had some coding errors, which are explained below:
Around line 30:
You forgot a '=back' before '=head1'
Around line 32:
'=item' outside of any '=over'
Around line 71:
You forgot a '=back' before '=head1'
perl v5.10.1 2010-04-04 VM(1)