Script required to put colon


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Script required to put colon
# 1  
Old 07-18-2011
Script required to put colon

Hi Expert,

I need help on script to put colon between two characters.

From this line 60060160B18414009C557D9DE02CDF11
to this 60:06:01:60:B1:84:14:00:9C:55:7D:9D:E0:2CSmilieF:11

Any way to make it on script.
# 2  
Old 07-18-2011
Try:

PHP Code:
echo "60060160B18414009C557D9DE02CDF11" sed -'s/../&:/g' -'s/.$//' 
# 3  
Old 07-18-2011
Thanks for the quick replay it work's great. Now I will make this command in script to make work simple
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Put currently running script into background

Hi All, Suppose I have a script and inside it I want/need to put it into background. I need the script to not react to SIGHUP signals. I tried: #!/bin/bash echo "" > test_disown mypid=$$ echo "PID=$mypid" ( kill -SIGSTOP $mypid jobs > myjobs #disown -h <job-spec> #kill -SIGCONT $mypid )... (6 Replies)
Discussion started by: JackK
6 Replies

2. Shell Programming and Scripting

Required to get out put of log in tabular format in email body

Dears Please support I have out put in text file and look like below fixed inquiries - Click on MAX suffix http://server:port/app User Details http://server:port/app Audit User Detail Action hhttp://server:port/app fixed inquiries - Click on MAX suffix http://server:port/app User Details ... (13 Replies)
Discussion started by: mirwasim
13 Replies

3. UNIX for Dummies Questions & Answers

Perl Script:how to find how many parameters are required to run the script

How to find how many parameters are required to run a Perl script? (1 Reply)
Discussion started by: Lakshman_Gupta
1 Replies

4. Shell Programming and Scripting

Put Script on Start-up the sh Terminal

Hi all I want to put this script on start-up the sh Terminal to save history of output: if ; then logdir=$HOME/terminal-logs if ; then mkdir $logdir fi gzip -q $logdir/*.log logfile=$logdir/$(date +%F_%T).$$.log ... (12 Replies)
Discussion started by: Rahim_T
12 Replies

5. Shell Programming and Scripting

Need a script to convert comma delimited files to semi colon delimited

Hi All, I need a unix script to convert .csv files to .skv files (changing a comma delimited file to a semi colon delimited file). I am a unix newbie and so don't know where to start. The script will be scheduled using cron and needs to convert each .csv file in a particular folder to a .skv... (4 Replies)
Discussion started by: CarpKing
4 Replies

6. Shell Programming and Scripting

Colon in awk script output

I'm using AIX 5.3 and running a awk replace to modify data as follows: echo 1234: 1234 123 123 444 555 666 7777 | awk '/^:/{split($2,N);n=N} {n=$1} {sub(n,n+10000000)}1' 10001234 1234 123 123 444 555 666 7777 dumb question.. how do I get the colon back in, so it outputs 10001234: 1234... (4 Replies)
Discussion started by: say170
4 Replies

7. UNIX for Dummies Questions & Answers

put script into file

hi, ok having here some code like: #!/bin/bash echo " hello " # say hello to the user echo " $HOME " echo " $HOSTNAME " echo " $(uname) " echo " today is $(date) " echo " $(whoami) is currently logged in " now my question is how to change the code so that the info is not... (12 Replies)
Discussion started by: me.
12 Replies

8. Shell Programming and Scripting

Could I put this into a case script instead?

Hi guys, I have a script which clears down a range of directories, however it can take a while to run. Is there a way I can simplify the below, perhaps adding it into a case statement? client_directories=/usr/local/production/cleanup/bin/client_cleanups/client_directories.txt # clear down... (2 Replies)
Discussion started by: JayC89
2 Replies

9. Solaris

how to put script in startup

Hi All, O/S: Solaris 5.10 Software installed :- Oracle 10G Weblogic 10.30 the problem i face that when the server restart for any reason SQL> exit bash-3.00# sqlplus sys/manchester as sysdba SQL*Plus: Release 10.2.0.1.0 - Production on Sun May 2 11:04:50 2010 Copyright (c)... (3 Replies)
Discussion started by: xxmasrawy
3 Replies

10. UNIX for Dummies Questions & Answers

Where should I put the script?

Hi Guys, I'm a new to the UNIX. Let say I have a 1 simple script to stop and start vnc service. I want to use that script for support because my network connection to my client side is not stable and every time I have to use a long command to restart vnc. Where should I put that script?... (3 Replies)
Discussion started by: akuslive
3 Replies
Login or Register to Ask a Question