10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
string="din&esh\nisgood"
File.txt:
the name is
sed "s#\#${string}#g" File.txt
Output am getting:
the name is dinesh
is good
Expected output:
the name is din&esh\nisgood
The input string is dynamic it will be keep on changing
am able to handle & by placing \& in the string.. (5 Replies)
Discussion started by: dineshaila
5 Replies
2. Shell Programming and Scripting
Hello,
Need a AWK command to find and replace Double Quotes in Pipe delimited files
Actully its a CSV file converted to Pipe but the double quotes still exists. So i want to Get rid of them.
Example
Input
1|2|3|sadsad|"Abc Efg 3"""|dada
Output
1|2|3|sadsad|Abc Efg 3"|dada
Thanks... (5 Replies)
Discussion started by: krux_rap
5 Replies
3. UNIX for Dummies Questions & Answers
Currently, I have a print filter that takes a text file, that convert it into PCL which then gets to a HP printer. This works.
Now I need to embedded a image file within the text file.
I'm able to convert the image file into PCL and I can cat both files together to into a single document... (1 Reply)
Discussion started by: chedlee88-1
1 Replies
4. Shell Programming and Scripting
Experts:
LINE1 :This is line one The FIRST line of the file.
LINE2 :This is line two
LINE3 :This is line three with 8 fileds
LINE4 :This is line four
LINE5 :This is line five
LINE6 :This is line six with 8 fileds
I want to delete line 1, and then process the file and want to print lines... (2 Replies)
Discussion started by: rveri
2 Replies
5. Shell Programming and Scripting
AWK Gurus,
data:
srvhcm01 AZSCI
srvhcm01 AZSDB
srvhcm01 BZSDB
srvhcm01 E2QDI31
srvhcm01 YPDCI
srvhcm01 YPDDB
srvhcm01 UV2FSCR
srvhcm01 UV2FSBI
srvhcm01 UV2FSXI
srvhcm01 UV2FSUC
srvhcm01 UV2FSEP
srvhcm01 UV2FSRE
srvhcm01 NASCI
srvhcm01 NASDB
srvhcm01 UV2FSSL
srvhcm01 UV2FSDI (7 Replies)
Discussion started by: rveri
7 Replies
6. Programming
Hello, I'm stuck and this is a matter which I need to resolve quite fast (but I couldn't post in the "Emergency" section); the problem is this :
I have created a chat program in which the client sends the sentence to the server and then the server should send it to all the clients connected,... (2 Replies)
Discussion started by: timmyyyyy
2 Replies
7. Shell Programming and Scripting
I would like to print result of multiple search pattern invoked from an one liner. The code looks like this but won't work
gawk -F '{{if ($0 ~ /pattern1/) pat1=$1 && if ($0 ~ /pattern2/) pat2=$2} ; print pat1, pat2}'
Can anybody help getting the right code? (10 Replies)
Discussion started by: sdf
10 Replies
8. Shell Programming and Scripting
Hello,
I have a CSV-like dataset where some of the columns contain HTML snippets which I need to convert to XHTML. For any given snippet, I have a functioning config for the text processor 'tidy' such that
tidy -config tidy.cfg example.html
does the job I need done.
I would like to process... (10 Replies)
Discussion started by: bstamper
10 Replies
9. Shell Programming and Scripting
Hello,
I would like to pipe two variables into awk, but I don't know how to do.
Each variable, "a" and "b", are in fact a list of data. They are not files.
So to get awk to work with it I am using:
echo $a | awk 'FNR==NR{print $1}FNR!=NR{print $4}'
The above works, but when I am... (5 Replies)
Discussion started by: jolecanard
5 Replies
10. Filesystems, Disks and Memory
Hello!
How I can increase or decrease predefined pipe buffer size?
System FreeBSD 4.9 and RedHat Linux 9.0
Thanks! (1 Reply)
Discussion started by: Jus
1 Replies