9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, I want to print the first column with original value and without any double quotes
The output should look like
<original column>|<column without quotes>
$ cat a.txt
"20121023","19301229712","100397"
"20121023","19361629712","100778"
"20121030A","19361630412","100838"... (3 Replies)
Discussion started by: ysrini
3 Replies
2. Shell Programming and Scripting
I am trying to write my gsub regex to replace a bunch of special characters with spaces, so i can split it to an array and look at each word independently.
However, my regex skills are slightly lacking and I appear to be missing a quote or something here.
I am trying to replace the following... (6 Replies)
Discussion started by: nitrobass24
6 Replies
3. Shell Programming and Scripting
I'm trying to run a code using gawk and I'm having some trouble with it. What I'm trying to do is pull out value11 from the following input:
value11,value12,value13
value21,value22,value23
I have successfully done this before using awk with the following code:
awk 'NR == 1 {FS=",";... (4 Replies)
Discussion started by: KomjongShawn
4 Replies
4. Shell Programming and Scripting
Hello,
i'm searching for a solution to this problem.
I have 2 files, the first one is like:
<HTML>
<HEAD>
<TITLE>{$String1}</TITLE>
</HEAD>
<BODY>
<P>{$String2}</P>
</BODY>
</HTML>and the other one:
{$String1}; french
{$String2}; italian
{$String3}; english
...
{$StringN};
I... (3 Replies)
Discussion started by: heaven25
3 Replies
5. Shell Programming and Scripting
Hi
New to shell script and awk and need assistance on this problem. I need to use a variable to substitute a string in an external file and write the changed info to another file.
At first I did not know if you could use a variable as the sub value but the following showed me that I can.
... (3 Replies)
Discussion started by: hukcjv
3 Replies
6. Shell Programming and Scripting
Hi all
I want to do a simple substitution in awk but I am getting unexpected output. My function accepts a time and then prints out a validation message if the time is valid. However some times may include a : and i want to strip this out if it exists before i get to the validation. I have shown... (4 Replies)
Discussion started by: pxy2d1
4 Replies
7. Shell Programming and Scripting
Hello,
I have a variable that displays the following results from a JVM....
1602100K->1578435K
I would like to collect the value of 1578435 which is the value after a garbage collection. I've tried the following command but it looks like I can't get the > to work. Any suggestions as... (4 Replies)
Discussion started by: npolite
4 Replies
8. Shell Programming and Scripting
Hello Freinds,
I am facing a starange problem with gawk .
My programme is as follows
#!/bin/sh
gawk -v AMPLITUDE=$1 -v freq=$2 ' \
BEGIN{
for(i=0; i<=2559; i++){
validec = sprintf("%1.3f", AMPLITUDE * sin( (i/2559) * 2* freq * 3.14159 ) )
validec =... (6 Replies)
Discussion started by: user_prady
6 Replies
9. Shell Programming and Scripting
Hello
I have problem with reg-expr and function gsub();
File that I want to preprocess look like this:
int table ;
printf(" variable : ", variable) ;
Using nawk I try something like this:
for ( .... )
{
line = $0
reg_expr = "\.\=]*" "" variable "" "\.\=]*" ;
gsub( reg_expr... (1 Reply)
Discussion started by: scotty_123
1 Replies