08-27-2010
Removing Special Character from File.
Hi,
My file has this special character "^M"
I would like to remove this characters.
eg:
abc,abc,^M
i tried using sed but doesnt work.
i used octal dump command to see special character it returns following:
015
\r
Appreciate your reply.
9 More Discussions You Might Find Interesting
1. Solaris
Hi together
I have 2 systems, mars and venus. The configuration is the same. Every system has a SDLT. I will now backup the datas from mars on the tapedevice from venus.
I have shareed the tapedevice (venus) and mounted on mars.
Now my problem: when I write on the mountet tapedevice, the... (1 Reply)
Discussion started by: MuellerUrs
1 Replies
2. Shell Programming and Scripting
hi
i want to delete a particular character in file.
example
file name:abcsample
abc=bbbqw3/
hidh=ajjqiwio4/
xyx=hakjp/
........../
......./
i want to delete that special character (/) in abcsample file.please give the required commands for my requirement.
thank you (3 Replies)
Discussion started by: srivsn
3 Replies
3. Shell Programming and Scripting
hi
i want to delete a particular character in file.
example
file name:abcsample
abc=bbbqw3/
hidh=ajjqiwio4/
xyx=hakjp/
........../
......./
i want to delete that special character (/) in abcsample file Permnently.please give the required commands for my requirement.
required... (1 Reply)
Discussion started by: srivsn
1 Replies
4. UNIX for Dummies Questions & Answers
I have a special character in my file. It displays as a '#' sign but when I do this command I do not find the line.
fgrep 'G#ant' file1
I want to replace the special character with another value but I need to know what character it really is. Any ideas on how to replace this '#' value with... (3 Replies)
Discussion started by: Ryan2786
3 Replies
5. Shell Programming and Scripting
I have file special.txt with the following data.
<header info>
123$ty5%98&0asd
1@356fgbv78
09*&^5jkns43(
...........some more rows.
In my output file, I want to eliminate all the special characters in my file and I want all other data. need some help. (6 Replies)
Discussion started by: srivsn
6 Replies
6. Shell Programming and Scripting
hello,
How to parse a file to see if a specific line is commented by '#' character?
filename: file1
cat file1
...
# /usr/bin/whatever
...
thank you (9 Replies)
Discussion started by: melanie_pfefer
9 Replies
7. Red Hat
All,
I am having a tough time with Linux and CSV file. My CSV file gets generated from Cognos on Linux machine that contains special characters. At first instance when I do vi <filename> to that file, I can't see anything. I did tail -2 and redirected to another temp file and did vi <filename>,... (2 Replies)
Discussion started by: donadarsh
2 Replies
8. Linux
I have a .CSV file when I check for the special characters in the file using the command cat -vet filename.csv, i get very lengthy lines with "^@", "^I^@" and "^@^M" characters in between each alphabet in all of the records. Using the code below file filename.csv I get the output as
I have a... (2 Replies)
Discussion started by: dhruuv369
2 Replies
9. UNIX for Advanced & Expert Users
Running SunOs 5.6. Solaris.
I've been able to remove all special characters from a fixed length file which appear in the first column but as a result all subsequent columns have shifted to the left by the amount of characters deleted.
It is a space separated file. Line 1 in input file is... (6 Replies)
Discussion started by: iffy290
6 Replies
mknod(1M) mknod(1M)
NAME
mknod - create special files
SYNOPSIS
name major minor
name major minor
name
DESCRIPTION
The command creates the following types of files:
o Character device special file (first form),
o Block device special file (second form),
o FIFO file, sometimes called a named pipe (third form).
name is the path name of the file to be created. The newly created file has a default mode that is readable and writable by all users(0666), but the mode is modified by the current setting of the user's file mode creation mask (see umask(1)).
Character and Block Special Files
Character device special files are used for devices that can transfer single bytes at a time, such as nine-track magnetic tape drives,
printers, plotters, disk drives operating in "raw" mode, and terminals. To create a character special file, use the argument.
Block device special files are used for devices that usually transfer a block of data at a time, such as disk drives. To create a block
device special file, use the argument.
The remaining arguments specify the device that will be accessible through the new special file:
major The major number specifies the major device type (for example, the device driver number).
minor The minor number specifies the device location, which is typically, but not always, the unit, drive, and/or line number.
The major and minor values can each be specified in hexadecimal, octal, or decimal, using C language conventions (decimal: no leading zero;
octal: leading zero; hexadecimal: leading
The assignment of major and minor device numbers is specific to each HP-UX system. Refer to the System Administrator manuals supplied with
your system for details.
Only users who have appropriate privileges can use to create a character or block device special file.
FIFO files
To create a FIFO (named pipe or buffer) file, use the argument. You can also use the command for this purpose (see mkfifo(1)). All users
can use to create FIFO files.
WARNINGS
Access Control Lists
In HFS file systems, optional ACL entries can be added to special files and FIFOs with the command (see chacl(1)). In JFS file systems,
optional ACL entries can be added to special files and FIFOs with the command (see setacl(1)). However, system programs are likely to
silently change or eliminate the optional ACL entries for these files.
SEE ALSO
chacl(1), mkdir(1), mkfifo(1), setacl(1), umask(1), lsdev(1M), sam(1M), mknod(2), acl(5), aclv(5), mknod(5).
HP-UX System Administrator manuals
STANDARDS CONFORMANCE
mknod: SVID2, SVID3, XPG2
mknod(1M)