Sponsored Content
Top Forums Shell Programming and Scripting doing rot13 on a field with a random number with awk Post 302239369 by Tytalus on Tuesday 23rd of September 2008 12:23:25 PM
Old 09-23-2008
How about some hacky sed for the caesar cipher....something like:

Code:
#   cmd="sed  -e '2s/\[.*\]/"$R"/'" ; eval echo "M:charity[cross]general:water:fairbanks:charity[cross]general | tr ':' '\n' |  $cmd " | sed -e '2y/abcdefghijklmnopqrstuvwxyz/itopsruleabcdfghjkmnqvwxyz/'  -e' y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/ITOPSRULEABCDFGHJKMNQVWXYZ/'
D
olikeny7usfskic
water
fairbanks
charity[cross]general

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

[awk]: Row begins by random number and field 10 is greater than 10.00%

Hello! I wish to extract the pid where CPU is above 10% last pid: 22621; load averages: 4.71, 5.04, 5.13 15:08:34 221 processes: 212 sleeping, 2 running, 1 stopped, 6 on cpu CPU states: %... (3 Replies)
Discussion started by: Lomic
3 Replies

2. Shell Programming and Scripting

use awk to aggregrate the field number

Hi, I have a various files;each filled with hundreds of line with similar number of fields. I would like to extract out field $5 from each of this file and aggregate them before printing out to a file. I tried to :- #!/usr/bin/awk -f file="file1.txt file2.txt file3.txt file4.txt" ... (1 Reply)
Discussion started by: ahjiefreak
1 Replies

3. Shell Programming and Scripting

awk sed cut? to rearrange random number of fields into 3 fields

I'm working on formatting some attendance data to meet a vendors requirements to upload to their system. With some help on the forums here, I have the data close. But they've since changed what they want. The vendor wants me to submit three fields to them. Field 1 is the studentid field,... (4 Replies)
Discussion started by: axo959
4 Replies

4. Shell Programming and Scripting

awk to print exact field number

Hello there. I want some help with awk I have this script that reads a file from awk and you can insert from keyboard any list from the fields that exist so to be printed on monitor echo "give a choice" read -a ans array=${ans} awk -F: -v k="$array" '{ ... (4 Replies)
Discussion started by: covis
4 Replies

5. Shell Programming and Scripting

Sorting on two fields time field and number field

Hi, I have a file that has data in it that says 00:01:48.233 1212 00:01:56.233 345 00:09:01.221 5678 00:12:23.321 93444 The file has more line than this but i just wanted to put in a snippet to ask how I would get the highest number with time stamp into another file. So from the above... (2 Replies)
Discussion started by: pat4519
2 Replies

6. Shell Programming and Scripting

awk conditional expression to compare field number and variable value

Hi, I'm trying to compare the value in a field to the value in a variable using awk. This works: awk '$7 == "101"'but this is what I want (and it doesn't work): value=101 awk '$7 == "$value"' Any help or insight on this would be great. Thanks in advance. (1 Reply)
Discussion started by: goodbenito
1 Replies

7. Shell Programming and Scripting

awk assign output of array to specific field-number

With this script i want to print the output to a specific field-number . Can anybody help? awk 'NR=FNR{split(FILENAME,fn,"_");nr=$2;f = $1} END{for (i=1;i<=f;i++) print i,$fn=nr}' input_5.csv input_6.csvinput_5.csv 4 135 5 185 6 85 11 30input_6.csv 1 90 3 58 4 135 7 60 8 55 10... (1 Reply)
Discussion started by: sdf
1 Replies

8. Programming

random number

How can I choose randomly the row numbers of my file in awk? (4 Replies)
Discussion started by: Homa
4 Replies

9. Shell Programming and Scripting

awk to find number in a field then print the line and the number

Hi I want to use awk to match where field 3 contains a number within string - then print the line and just the number as a new field. The source file is pipe delimited and looks something like 1|net|ABC Letr1|1530||| 1|net|EXP_1040 ABC|1121||| 1|net|EXP_TG1224|1122||| 1|net|R_North|1123|||... (5 Replies)
Discussion started by: Mudshark
5 Replies

10. Shell Programming and Scripting

awk command to return only field with a number in it

What is an awk command to print only fields with a number in it?? Input file....... S,S,S,S,S,S,S,S,S 001S,S,S,S,S,S,S,S,S 00219S,23S,24S,43S,47S,S,S,S,S 00319S,10S,23S,41S,43S,47S,S,S,S 00423S,41S,43S,46S,47S,S,S,S,S 00510S,23S,24S,43S,46S,S,S,S,S 00610S,23S,43S,46S,47S,S,S,S,S... (2 Replies)
Discussion started by: garethsays
2 Replies
MMROFF(1)						      General Commands Manual							 MMROFF(1)

NAME
mmroff - cross reference preprocessor SYNOPSIS
mmroff [ -x ] groff_arguments DESCRIPTION
mmroff is a simple preprocessor for groff, it is used for expanding cross references in mm, see groff_mm(7). groff is executed twice, first with -z and -rRef=1 to collect all cross references and then to do the real processing when the cross reference file is up to date. -x Just create the cross reference file. This can be used to refresh the cross reference file, it isn't always needed to have accurate cross references and by using this option groff will only be run once. AUTHOR
Jorgen Hagg, Lund, Sweden <jh@axis.se>. FILES
/usr/share/groff/1.22.2/tmac/m.tmac /usr/share/groff/1.22.2/tmac/mm/*.cov /usr/share/groff/1.22.2/tmac/mm/*.MT /usr/share/groff/1.22.2/tmac/mm/locale SEE ALSO
groff_mm(7), groff_mmse(7), groff(1), troff(1), tbl(1), pic(1), eqn(1) Groff Version 1.22.2 9 June 2014 MMROFF(1)
All times are GMT -4. The time now is 08:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy