05-13-2005
Since you are working with DOS text files, unix has a utility called either dos2ux or dos2unix which cleans up all the non-unix crud in DOS files moved to unix.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
In a previous post I needed to walk through a list of files. This works fine, but when I attempt to use the nawk line (below) I can only write to first file that's found. The files I'm trying to write to (${target_dir}${product}.html) already exist and are created by another part of my script that... (1 Reply)
Discussion started by: ricksj
1 Replies
2. Shell Programming and Scripting
Hi friends ,
I am confused with << EOF
EOF
Most of the cases I found
sqlplus $db_conn_str << EOF
some sql staments
EOF
another exapmle is
#!/bin/sh
echo -n 'what is the value? '
read value
sed 's/XXX/'$value'/' <<EOF
The value is XXX
EOF (1 Reply)
Discussion started by: imipsita.rath
1 Replies
3. Shell Programming and Scripting
Hi Everyone,
1.txt
test here (888_f)a/fff (eeee) test2 (q)--(qq)
the output is
test here a/fff test2 --
means remove the characters in between (), and () itself. Please advice.
Thanks (3 Replies)
Discussion started by: jimmy_y
3 Replies
4. Shell Programming and Scripting
Hi,
I want to know how I can remove the last characters of ANY pdf file. I read it under "od" in the command shell to see which were the last characters:
$od corruptedfile.pdf -c
When I see the file, I need to keep only the last characters, or "end of the file": %EOF (obviously keeping all... (1 Reply)
Discussion started by: diegugawa
1 Replies
5. Shell Programming and Scripting
fq-bar-something-1.0-r1.src.rpm ----> fq-bar-something
fq-bar-xx-r1-rel.src.rpm ---------> fq-bar-xx
fq-bar-ff-ver-11-rel.src.rpm -------> fq-bar-ff-ver
any help? (5 Replies)
Discussion started by: yanglei_fage
5 Replies
6. Shell Programming and Scripting
I am trying to get grep with awk command into variable.
But facing error.
Could someone pls help.
$ cat test_file
DEPLOYMENT="abc" # com
cluster="bcn"
$ grep DEPLOYMENT test_file | awk -F "\"" '{ print $2 }'
abc
$ a=`echo "grep DEPLOYMENT test_file | awk -F \"\\\"\" '{ print $2 }'"` ;... (6 Replies)
Discussion started by: Manasa Pradeep
6 Replies
7. Shell Programming and Scripting
I have the following code for removing duplicate records based on fields in inputfile file & moves the duplicate records in duplicates file(1st Awk) & in 2nd awk i fetch the non duplicate entries in inputfile to tmp file and use move to update the original file.
Requirement:
Can both the awk... (4 Replies)
Discussion started by: siramitsharma
4 Replies
8. Shell Programming and Scripting
Hi All,
I have searched many threads for possible close solution. But I was unable to get simlar scenario.
I would like to print all duplicate based on 3rd column except the first occurance. Also would like to print if it is single entry(non-duplicate).
i/P file
12 NIL ABD LON
11 NIL ABC... (6 Replies)
Discussion started by: sybadm
6 Replies
9. Shell Programming and Scripting
cat input.txt
a x
b y
c z
Expected output
x
y
z (11 Replies)
Discussion started by: cola
11 Replies
10. UNIX for Beginners Questions & Answers
Hi Everybody:
I need your help, please...
I have this file *.txt
0000 | 16010201 22000000 67892000 00000000 00000000 00000100 72246681 28E08236
| ~~~~"~~~g~ ~~~~~~~~~~~~~r$f~(~~6 |
0020 | 10476173 90010100 10000000 00000001 05000226 17163011 12442212 48140484
|... (2 Replies)
Discussion started by: solaris21
2 Replies