10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I'm trying to figure out a way to use a decode64 function in an embedded system who has few utilities, including busybox.
Right now have something like this (taken from "google base64-and-base85-encoding-awk-scripts" sorry, I'm not able to post urls yet)
_decode64()
{
&&... (4 Replies)
Discussion started by: chilicuil
4 Replies
2. Shell Programming and Scripting
Hi,
I am having the following doubts on awk. Please clarify for me.
a) What does it mean?
awk '$1=$1' and how does it change if I append FS="" to the above code?
b) What if I use awk -vFS="\n" (i.e) setting (input) field separator to newline char, then what will be the value of $0,... (6 Replies)
Discussion started by: royalibrahim
6 Replies
3. Shell Programming and Scripting
Hi,
I'm working with gawk (on DOS) today.
A goal is: find a string for-instance '123', cut a line in two columns and write second one. The problem is: command line works OK, awk file doesn't. But I would like to work with file because there are many strings to find.
input:
line command:
awk... (4 Replies)
Discussion started by: frajer
4 Replies
4. Shell Programming and Scripting
Hi Guys,
After windows died on my netbook I installed Lubuntu and discovered Gawk about a month ago. After using Excel for 10+ years I'm amazed how quick and easily Gawk can process data but I'm stuck with a little problem merging data from multiple lines.
I'm an SEO Consultant and provide... (9 Replies)
Discussion started by: Jamesfirst
9 Replies
5. Shell Programming and Scripting
I am using a solution that was provided by a member:
awk '{s=$0;if(length(s) < 700){getline; s=s " " $0}printf("%s\n",s)}'
This scans through a file and removes '\n' within a record but not the record delimiter.
However, there are instances where there are MULTIPLE instances of '\n'... (10 Replies)
Discussion started by: CKT_newbie88
10 Replies
6. Shell Programming and Scripting
Hello,
I have a file containing lines such as:
(1 104 (16) (17) (18) (102))$
(1 105 (16) (17) (19:21) (102))$
I would like to extract the numbers, only by using awk (or gawk).
I do not want to use "sed" as it is very slow.
For now my solution consists in... (2 Replies)
Discussion started by: jolecanard
2 Replies
7. Shell Programming and Scripting
In this following command:
awk 'BEGIN{ORS=""}1'
what does '1' signifies that comes after closing curly brace '}' of awk? I guess, it does not mean 'first occurrence' because I verified that.
And, pls tell me how to override or suppress awk's field variables like $1, $2.. by positional... (7 Replies)
Discussion started by: royalibrahim
7 Replies
8. Shell Programming and Scripting
Hi,
I have 3 doubts which I posted it here.
Doubt 1:
I have a file containing data:
22 -73 89 10
99 21 15 -77
23 63 -80 91
-22 65 28 97
I am trying to print the fields in the reverse order and replace every field by its absolute (positive) value
(ie.) I am looking for output:
10... (8 Replies)
Discussion started by: royalibrahim
8 Replies
9. Shell Programming and Scripting
Hi.
I'm trying to convert bat file into shell script. Bat file invokes awk file in one section:
c:\upg\exe\gawk -f c:\upg\awk\gen_sae.awk -v OP=C:\\upg\\lod\\... ...c:\upg\ref\saaxi.ref c:\upg\log\SAAEPWO.log c:\upg\ref\saaepref.log
First of all I issued unix2dos command on that awk file.... (0 Replies)
Discussion started by: andrej
0 Replies
10. UNIX for Dummies Questions & Answers
Hello all,
I'm totally new to UNIX/Linux but I'm taking a course in it at my local JC.
My question: I have been tasked with writing a gawk script that will create a nicely formatted report. That part I've done ok on...however, the very last thing that must be done is a calculation of a... (4 Replies)
Discussion started by: Trellot
4 Replies