Below an example of what I mean. The first attempt does what I want; the second doesn't, because bash assumes a line break means the end of an individual "command unix". Is there some way that I can convince bash to parse out, eg, to the closing parenthesis?
I'm thinking this would allow for... (1 Reply)
I have several huge files wich contains oracle table creation scripts as follows:
I would need to remove the pattern colored in red above. Any sed/awk/pearl code will be of much help.
Thanks (2 Replies)
Hi All,
I have named a file with current date,time and year as follows:
month=`date | awk '{print $2}'`
date=`date | awk '{print $3}'`
year=`date | awk '{print $6}'`
time=`date +%Hh_%Mm_%Ss'`
filename="test_"$month"_"$date"_"$year"_"$time".txt"
> $filename
The file is created with a... (2 Replies)
Hi All,
We append the output of a file's size in a file. But a newline character is appended after the variable.
Pls help how to clear this.
filesize=`ls -l test.txt | awk `{print $5}'`
echo File size of test.txt is $filesize bytes >> logfile.txt
The output we got is,
File size of... (4 Replies)
Hi All,
I have 5000 records like this
Request_id|Type|Status|Priority|Ticket Submitted Date and Time|Actual Resolved Date and Time|Current Ticket Owner Group|Case final Ticket Owner Group|Customer Severity|Reported Symptom/Request|Component|Hot Topic|Reason for Missed SLA|Current Ticket... (2 Replies)
Hello all,
first off great forum.
Now for my little problem.
Using RHEL 5.4 and awk. Been doing code since a few month. So just starting.
My problem is handeling data on multiple lines.
{
if ($1 != LASTKEY && h ~ /.*\/s_fr_/) {
checkgecos( h, h )
h=""
... (2 Replies)
Hi,
In my file, I have '\n' characters inside a single record. Because of this, a single records appears in many lines and looks like multiple records. In the below file.
File 1
====
1,nmae,lctn,da\n
t
2,ghjik,o\n
ut,de\n
fk
Expected output after the \n removed
File 2
=====... (5 Replies)
hi i am having delimited .dat file having content like below.
test.dat(5 line of records)
======
PT2~Stag~Pt2 Stag Test.
Updated~PT2 S T~Area~~UNCEF R20~~2012-05-24 ~2014-05-24~~
PT2~Stag y~Pt2 Stag Test.
Updated~PT2 S T~Area~METR~~~2012-05-24~2014-05-24~~test
PT2~Pt2 Stag Test~~PT2 S... (4 Replies)
Hi all..
I have a text file which looks like below:
abcd
efgh
ijkl
(blank space)
I need to remove only the last (blank space) from the file. When I try wc -l the file name,the number of lines coming is 3 only, however blank space is there in the file.
I have tried options like... (14 Replies)
I have a file which comes every day and the file data look's as below.
Vi abc.txt
a|b|c|d\n
a|g|h|j\n
Some times we receive the file with only a new line character in the file like
vi abc.txt
\n (8 Replies)
Discussion started by: rak Kundra
8 Replies
LEARN ABOUT CENTOS
uuencode
UUENCODE(5) File Formats Manual UUENCODE(5)NAME
uuencode - format of an encoded uuencode file
DESCRIPTION
Files output by uuencode(1) consist of a header line, followed by a number of body lines, and a trailer line. The uudecode(1) command will
ignore any lines preceding the header or following the trailer. Lines preceding a header must not, of course, look like a header.
The header line is distinguished by having the first 6 characters begin This is followed by a mode (in octal), and a string which names
the remote file. A space character separates the three items in the header line.
The body consists of a number of lines, each at most 62 characters long (including the trailing newline). These consist of a character
count, followed by encoded characters, followed by a newline. The character count is a single printing character, and represents an inte-
ger, the number of bytes the rest of the line represents. Such integers are always in the range from 0 to 63 and can be determined by sub-
tracting the character space (octal 40) from the character.
Groups of 3 bytes are stored in 4 characters, 6 bits per character. All are offset by a space to make the characters printing. The last
line may be shorter than the normal 45 bytes. If the size is not a multiple of 3, this fact can be determined by the value of the count on
the last line. Extra garbage will be included to make the character count a multiple of 4. The body is terminated by a line with a count
of zero. This line consists of one ASCII space.
The trailer line consists of end on a line by itself.
SEE ALSO uuencode(1), uudecode(1), uusend(1), uucp(1), mail(1)HISTORY
The uuencode file format appeared in BSD 4.0 .
UUENCODE(5)