Search Results

Search: Posts Made By: djkane
2,877
Posted By djkane
removing certain tabs
I have a tab delimited file with many lines, one for each record.

each line is tab delimited with a tab before the first data field, a tab between each data field, and a tab after the last data...
3,273
Posted By djkane
Thanks for your reply. I've tried implementing...
Thanks for your reply. I've tried implementing your suggestion but the terminal still hangs. It's as if it's not executing the quit command.

Here is what I have now....

echo "ftp -n...
3,273
Posted By djkane
FTP Question
I'm basically trying to FTP a file to a differnt node, first putting the FTP commmands into a text file and then piping the commands file into the ftp command as follows....

echo "user $USERNAME...
2,228
Posted By djkane
no. that won't work because the optional section...
no. that won't work because the optional section needs to be validated to contain only a space followed by 2 alphanumeric characters, a forawrd slash and a further alphanumeric character.

All...
2,228
Posted By djkane
Regular Expression problem
Hi guys

I've been trying to write a regular expression.
If I'm tryin to validate a sequence of characters as follows...

AB1-232-623482-743 43/3

where

a) any character after the "AB"...
8,018
Posted By djkane
Problem with clear command
Hi All

I'm currently writing a very simple UNIX script to process some work. The very first thing I do on my script is use the "clear" command.

how my file looks...

clear
echo "Return...
18,076
Posted By djkane
thanks guys for your replies. this has helped me...
thanks guys for your replies. this has helped me to understand :)
18,076
Posted By djkane
sed -e "s/[' ']*|/|/g" $FILE Using the line...
sed -e "s/[' ']*|/|/g" $FILE

Using the line of code above, i get trailing spaces to be removed between the end of the field and the delimiter. I was hoping someone might explain how the command...
18,076
Posted By djkane
works like a charm.... thanks mate :D
works like a charm.... thanks mate :D
18,076
Posted By djkane
Removing trailing spaces from delimited files
Hi All

I have a file of the following format (delimited by |)

this is field 1 | field 2 (lots of blank spaces) | field 3 (lots of blank space) |
field 1 | more text...
4,503
Posted By djkane
works beautifully, thanks mate. can you explain...
works beautifully, thanks mate. can you explain how this works though?
4,503
Posted By djkane
Getting a substring
This is probably pretty simple butI'm not sure how to best go about it.

If I have

FILE="myBigLongFileName_1.xls"
FILE_PREFIX=`echo $FILE| cut -d"." -f1`

# that gives "myBigLongFileName_1"...
15,287
Posted By djkane
for anyone that wants to know i found a different...
for anyone that wants to know i found a different piece of code to use

#*********************************************************
# CHANGE LOG:
# DATE PERSON COMMENT
#...
15,287
Posted By djkane
No, i'm returning a record from the DB, and one...
No, i'm returning a record from the DB, and one of the fields has ^Ms contained within it. This means it won't be the last character unfortunately.
15,287
Posted By djkane
Removing control-Ms (^M)
Anyone know how to remove ^M's from a text file using sed command?
2,313
Posted By djkane
trying to remove newline characters from the...
trying to remove newline characters from the middle of a data field but leave the newline character at the end of the row returned.

does that make sense??
2,313
Posted By djkane
can anyone explain this?
:start
/@~/{
h
s/\(.*\)@~.*$/\1/
s/@~$//
s/@~/\
/g
p
g
s/.*@~\(.*\)/\1/
}
/[^@][^~]/{
N
s/\n/ /
b start
}
14,754
Posted By djkane
I am returning results set from Sybase stored...
I am returning results set from Sybase stored proc. Is there a function in Sybase that may remove the newline characters?
14,754
Posted By djkane
unfortunately i can't use perl mate. it's not...
unfortunately i can't use perl mate. it's not available. it has to be done using a regular expression in UNIX.
14,754
Posted By djkane
maybe there's a different way of representing...
maybe there's a different way of representing newline characters when using sed??

if i use

sed -e s/^M//g myFile.out

then the ^M is removed. All i need to do now is try and get line 3 in...
14,754
Posted By djkane
text file is like follows (this is how it would...
text file is like follows (this is how it would look using vi)

line1field1 line1field2 line1field3 line1field4 line1field5
line2field1 line2field2 line2field3 ...
14,754
Posted By djkane
uname -a gives... AIX carnowen 2 5...
uname -a gives...

AIX carnowen 2 5 005AA72F4C00

I need to remove a combination of ^M and newline character.

i tried...

sed s/^M\n//g but this does not work :'(

thanks for your help...
14,754
Posted By djkane
dos2ux does not work either :(
dos2ux does not work either :(
14,754
Posted By djkane
dos2unix is not a recognised command. I already...
dos2unix is not a recognised command. I already remove the ^M using the sed command but i need to remove it <b> in combination with </b> the newline character.

Any other ideas?
14,754
Posted By djkane
Sorry mate. First time using the forums and i...
Sorry mate. First time using the forums and i wasn't sure how to move the thread as I think I posted it in the wrong place to begin with.

I will try your suggestion.
Showing results 1 to 25 of 27

 
All times are GMT -4. The time now is 06:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy