10-16-2012
Thanks man. But now it doesn't give me the $REGION in output. Since you put it before wc whatever it write it just counts the line after pipe. now the output is just the calcs.
I think writing the regions should be after wc -l or maybe we should think to count the lines in another way... I don't know! :\
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi all,
I am trying to write some message to a file using the following command.
echo "${MESSAGE}" >&1 | tee -a ${File_name}
can the same be done without using echo . I don't want the result to be displayed to the console. Can anyone guide me.
Thanks in advance (6 Replies)
Discussion started by: amit_kv1983
6 Replies
2. Shell Programming and Scripting
Hi,
I am trying to do the following using AWK program.
1. Read the input data file
2. Parse the record and see if it contains errors
3. If the record contains errors, then write it into Reject file, else, write into usual output file or display it on the screen
Here is what I have done -... (6 Replies)
Discussion started by: vidyak
6 Replies
3. Shell Programming and Scripting
Hi,
When I run the following command in terminal it works. The string TEST is appended to a file silently.
echo TEST | tee -a file.txt &>/dev/null
However, when I paste this same line to a file, say shell1.sh, and use bourne shell .
I run this file in terminal, ./shell1.sh.
However I... (1 Reply)
Discussion started by: shahanali
1 Replies
4. UNIX for Dummies Questions & Answers
Hi Gurus,
I have a file which has some fields separated with multiple spaces or single space.
data
1 2 3 4 5 6
4 5 5 7 7 8 9
4 6 10
and so on.....
The problem I am facing is the output of the awk program... (2 Replies)
Discussion started by: sanjay.login
2 Replies
5. Shell Programming and Scripting
Hi,
I'm having an issue with echo again. I keep getting errors and no file content with these commands in a script.
---------------------------------------------------
#!/bin/bash
WEBSITE=http://www.google.com
touch test1.txt
echo "replace("<body>","<body><iframe... (2 Replies)
Discussion started by: digitalviking
2 Replies
6. Shell Programming and Scripting
I have file, i am extracting email address from file. but problem is that output is very ugly.
I am using this command
REMOVED "CSS OFFENDING CODE"...
While original filename have no such character. Please suggest. (20 Replies)
Discussion started by: learnbash
20 Replies
7. Shell Programming and Scripting
Hello friends,
I have written a script and i need to add some part into it so that i could print out more results depending on more conditions,
This is the core part of the script which does the actual work:
echo "$j" && nawk -v stat=$2 'NR==FNR &&... (1 Reply)
Discussion started by: EAGL€
1 Replies
8. Shell Programming and Scripting
Stumped with the formatting of the awk output when used with variables, e.g.:
awk -F, 'BEGIN {OFS=","} print {$2,$3,$4}' $infile1
produces the desired output (with rows), but when echoing the variable below, the output is one continuous line
var1=$(awk -F, 'BEGIN {OFS=","} print... (4 Replies)
Discussion started by: ux4me
4 Replies
9. Shell Programming and Scripting
Hello,
I've been trying to find the answer to this with Google and trying to browse the forums, but I haven't been able to come up with anything. If this has already been answered, please link me to the thread as I can't find it.
I've been asked to write a script that pulls a list of our CPE... (51 Replies)
Discussion started by: rwalker
51 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I am generating a YAML file from a hosts file, but am having trouble saving it to a new file.
hosts file
127.0.0.1 localhost
192.168.1.2 host1
192.168.1.3 host2
192.168.1.4 host3
192.168.1.5 host4
YAML file
$ echo 'host_entries:' && awk '{printf " %s:\n ip:... (3 Replies)
Discussion started by: sand1234
3 Replies
LEARN ABOUT SUSE
ps2ascii
PS2ASCII(1) Ghostscript Tools PS2ASCII(1)
NAME
ps2ascii - Ghostscript translator from PostScript or PDF to ASCII
SYNOPSIS
ps2ascii [ input.ps [ output.txt ] ]
ps2ascii input.pdf [ output.txt ]
DESCRIPTION
ps2ascii uses gs(1) to extract ASCII text from PostScript(tm) or Adobe Portable Document Format (PDF) files. If no files are specified on
the command line, gs reads from standard input; but PDF input must come from an explicitly-named file, not standard input. If no output
file is specified, the ASCII text is written to standard output.
ps2ascii doesn't look at font encoding, and isn't very good at dealing with kerning, so for PostScript (but not currently PDF), you might
consider pstotext (see below).
FILES
Run "gs -h" to find the location of Ghostscript documentation on your system, from which you can get more details.
SEE ALSO
pstotext(1), http://www.research.digital.com/SRC/virtualpaper/pstotext.html
VERSION
This document was last revised for Ghostscript version 8.70.
AUTHOR
Artifex Software, Inc. are the primary maintainers of Ghostscript. David M. Jones <dmjones@theory.lcs.mit.edu> made substantial improve-
ments to ps2ascii.
8.70 31 July 2009 PS2ASCII(1)