Relatively new to Linux but I'm trying to solve a problem.
I'm trying to make a cryptogram solver script where I use tr to easily replace the "cryptic" letters with the solved letters. I have the cryptogram as an all-lowercase text file crypt.txt. When I make replacements, the replacement letters will be uppercase to distinguish them.
My problem is that I also want those letters to change color.
I took this code from a different post I found from a search on these forums:
and edited it for my use. My general format for letter replacing say, a "k" with an "L", is:
but this only works if the letter is by itself e.g. not in the middle of a word. I've tried adding * to each side of L but was unsuccessful.
Any help would be appreciated! Thanks. This is my first post so hello everyone
Thanks rudic, I tried that code but nothing changed. I can get the original code I used to work as long as the objective letter is by itself e.g. not part of a 2+ letter word.
jereESC[1;31mLESC[0myab5 has just replied to a thread you have subscribed to entitled -
Trying to ESC[1;31mLESC[0make cryptograESC[1;31mLESC[0m script - in the UNIX for DuESC[1;31mLESC[0mESC[1;31mLESC[0mies Questions &
Answers foruESC[1;31mLESC[0m of Unix & Linux ForuESC[1;31mLESC[0ms.
This thread is located at: http://www.unix.coESC[1;31mLESC[0m/showthread.php?t=264178&goto=newpost
---------- Post updated at 18:08 ---------- Previous update was at 18:04 ----------
There's NO k in your text to be replaced! I'm using m as the target char.
DON'T cat the file, and DON'T tr the file. Use as given:
That changes lower case m to red upper case L , provided you enter the explicit <ESC> char and NOT two chars ^ and [ .
if i have a script called test.sh
file1=$(ls -l|awk '{print $9 $1}')
awk ' /date_of_selling:/ { print $6 ":" &9 }' /$file1 >> data.txt
if i wanna this script to run automatically every day at 8 am :D (3 Replies)
Good morning. I am searching for "how-to"'s for some particular questions:
1. How to write a script in HP-UX 11.
2. How to schedule a script.
3. How to "call" scripts from the original script.
4. How to su to another user from within a script.
This is the basics of what the... (15 Replies)
Hi All,
I have a script which throws the output if condition matches. I run the cmd :
# ldf
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c1t0d0s0 1984564 1375019 550009 72% /
/dev/dsk/c1t0d0s3 5040814 2628410 2361996 53% /usr... (4 Replies)
Hi,
I have a script that ftp over the file:
CFGFILE=/export/home/myuser/scripts/ftp1.cfg
LOGFILE=/app/bea/logs/
LOCALPATH=/expport/home/myuser/ECNLogs/
YEAR=`date '+%Y'`
MONTH=`date '+%m'`
DAY=`date '+%d'`
HOUR=`date '+%H'`
MINUTE=`date '+%M'`
LASTHOUR=$((HOUR-1))
echo $LASTHOUR
... (4 Replies)
Hi,
I have a very basic knowledge of Unix and I need your help for a small script that will do the following commands that I do manually by just giving the filename TPR20080414.txt
cut -d'|' -f3,4 TPR20080414.txt> oe_012.lkp
awk -F "|" '{temp=$1;$1=$2;$2=temp}1' OFS="|" oe_012.lkp >... (3 Replies)
Hi,
I try to write a script to create a new directory.
#!/bin/bash
echo "Please enter folder name (6 characters only) :"
read foldername
mkdir /home/user/$foldername
$foldername >> /home/list/list.txt
My question/situation:
1) how to ensure the folder name MUST BE 6 characters... (0 Replies)
I need to write a make script to install a C module in a UNIX
environment.It should install the sources, build the libraries and
install them and also install the info pages on the system.
Can this script be general enough to also install on
windows, windows dll, windows help file's etc. Any... (3 Replies)