10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a pipe delimited file and I'm trying to write a script that will give the character/byte positions of each pipe in the file. There may be some simple way but I don't know what it is... Can someone help with this?
Ex: file has output below
abc|def|ghi|
I want the script to tell the... (1 Reply)
Discussion started by: basz808
1 Replies
2. Shell Programming and Scripting
Hi,
First find the special character, from the special character take next two bytes convert the bytes to decimal and replace with next present byte of decimal value times.
E.g.
Input: 302619ú1A?
Output: 302619(3 spaces for ú1A)??????????????????????????
Thanks,
Dines (27 Replies)
Discussion started by: dineshnak
27 Replies
3. UNIX for Dummies Questions & Answers
Hello
I created 3 files by:
dd if=/dev/urandom bs=1024 count=1000000 of=./testfile1
dd if=/dev/urandom bs=1024 count=5000000 of=./testfile2
dd if=/dev/urandom bs=1024 count=10000000 of=./testfile3
Now I want to know how to make a change in a specific byte and/or line of theses files? (2 Replies)
Discussion started by: frhling
2 Replies
4. UNIX for Dummies Questions & Answers
I have a file ABC.DAT with 2 columns avaialble
Data format :
XYZ!$#$!120
XXZ!$#$!1000
YYZ!$#$!104
While running the following code :
FILE_COUNTER=1;
RECORD_CN_FILE_COUNT=$((`wc -l ABC.DAT| cut -f1 -d' '`));
while
do
FILE_NAME=`cat ABC.DAT.DAT| head -$FILE_COUNTER |tail -1 | awk -F... (1 Reply)
Discussion started by: Nikhil Gautam
1 Replies
5. UNIX for Dummies Questions & Answers
Greetings!
Can we automate the process of removing a newline char from selected rows in a fixed width file using a shell?
Input is like
abcd1234
xyzd1234
abcd
a1b2c3d4
abcd1234
xyzd1234
xx
abcd1234
Expected output -
abcd1234xyzd1234
abcda1b2c3d4abcd1234xyzd1234
xxabcd1234
... (2 Replies)
Discussion started by: mailme0205
2 Replies
6. Shell Programming and Scripting
Hello,
Need help substituting a particular word in a file having a single line but no newline character at the end.
I was trying to use sed but it doesn't work probably because there is no newline char at the end of the line.
$ cat hlq_detail
/outputs/alvan23/PDFs/bills
$ cat... (5 Replies)
Discussion started by: Shan_u2005
5 Replies
7. Shell Programming and Scripting
Heeloo all,
A weird problem perhaps. May god save others from this problem.
I want to print each line from a variable.. the example below should make it clear.
smvar="Hello World1
Hello world 2
forgot there I guess"
for eachline in $smvar
echo $eachline
end
Whats for... (3 Replies)
Discussion started by: pavanlimo
3 Replies
8. Shell Programming and Scripting
Hi,
How to replace any character in a file with a newline character using sed ..
Ex:
To replace ',' with newline
Input:
abcd,efgh,ijkl,mnop
Output:
abcd
efgh
ijkl
mnop
Thnx in advance.
Regards,
Sasidhar (5 Replies)
Discussion started by: mightysam
5 Replies
9. UNIX for Advanced & Expert Users
Anyone is well-versed to use egrep to search a file for a line containing both:
1) AAA
2) $
I am having problem escaping the dollar sign when using egrep in conjunction with satisfying AAA as well.
E.g. Text file
Line 1 AAA
Line 2 $$$
Line 3 AAA BBB $
Line 4 $$$ BBB AA
will return me... (2 Replies)
Discussion started by: izy100
2 Replies
10. Debian
Any ideas what could cause this? I have flow control set to XON XOFF on the printer and the on the OS level. (1 Reply)
Discussion started by: djsal
1 Replies