Hi All,
i have a csv file .
In the 7th column i have data that has line feed in it.
Requirement is to remove the line feed from the 7th column whenever it appears
There are 11 columns in the file
C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11
The value in C7 contains line feed ( Alt + Enter ),... (2 Replies)
Hello Gurus,
I need to create a file from a .csv file extracting specific columns only.
File structure is
Column1,Column2,Column3,Column4
abcd,1234,"asdf, tew,123",123456
efgh,234,asdf,654321
My output file should have
abcd,123456
efgh,654321
Can you pls help me with the code.
... (10 Replies)
Hello experts,
I have a requirement where I have to implement two checks on a csv file:
1. Check to see if the value in first column is duplicate, if any value is duplicate script should exit.
2. Check to verify if the value at second column is between "yes" or "no", if it is anything else... (4 Replies)
I have a .CSV file with the below format:
"column 1","column 2","column 3","column 4","column 5","column 6","column 7","column 8","column 9","column 10
"12310","42324564756","a simple string with a , comma","string with or, without commas","string 1","USD","12","70%","08/01/2013",""... (2 Replies)
input.csv:
Field1,Field2,Field3,Field4,Field4
abc ,123 ,xyz ,000 ,pqr
mno ,123 ,dfr ,111 ,bbb
output:
Field2,Field4
123 ,000
123 ,111
how to fetch the values of Field4 where Field2='123'
I don't want to fetch the values based on column position. Instead want to... (10 Replies)
cat sample.csv
ID,Name,no
1,AAA,1
2,BBB,1
3,AAA,1
4,BBB,1
cut -d',' -f2 sample.csv | sort | uniq
this gives only the 2nd column values
Name
AAA
BBB
How to I get all the columns of CSV along with this? (1 Reply)
Input
1,ABCD,no
2,system,yes
3,ABCD,yes
4,XYZ,no
5,XYZ,yes
6,pc,noCode used to find duplicate with regard to 2nd column
awk 'NR == 1 {p=$2; next} p == $2 { print "Line" NR "$2 is duplicated"} {p=$2}' FS="," ./input.csv
Now is there a wise way to de-duplicate the entire line (remove... (4 Replies)
Hi Gurus,
I have a file(weblog) as below
abc|xyz|123|agentcode=sample code abcdeeess,agentcode=sample code abcdeeess,agentcode=sample code abcdeeess|agentadd=abcd stereet 23343,agentadd=abcd stereet 23343
sss|wwq|999|agentcode=sample1 code wqwdeeess,gentcode=sample1 code... (4 Replies)
Discussion started by: ratheeshjulk
4 Replies
LEARN ABOUT ULTRIX
symlink
symlink(2) System Calls Manual symlink(2)Name
symlink - make symbolic link to a file
Syntax
symlink(name1, name2)
char *name1, *name2;
Description
A symbolic link name2 is created to name1 (name2 is the name of the file created, name1 is the string used in creating the symbolic link).
Either name can be an arbitrary path name. The files need not be on the same file system.
Return Values
Upon successful completion, a zero (0) value is returned. If an error occurs, the error code is stored in errno, and a -1 value is
returned.
Diagnostics
The symbolic link is made, unless one or more of the following are true:
[ENOTDIR] A component of the name2 prefix is not a directory.
[EEXIST] The name2 already exists.
[EACCES] A component of the name2 path prefix denies search permission.
[EROFS] The file name2 would reside on a read-only file system.
[EFAULT] The name1 or name2 points outside the process's allocated address space.
[ELOOP] Too many symbolic links were encountered in translating the pathname.
[ENAMETOOLONG] A component of either pathname exceeded MAXNAMELEN characters, or the entire length of either pathname exceeded MAXPATHNAME
characters.
[ENOENT] The named file does not exist.
[EIO] An I/O error occurred while making the directory entry for name2, or allocating the inode for name2, or writing out the link
contents of name2.
[ENOSPC] The directory in which the entry for the new symbolic link is being placed cannot be extended, because there is no space
left on the file system containing the directory.
[ENOSPC] The new symbolic link cannot be created, because there is no space left on the file system that will contain the symbolic
link.
[ENOSPC] There are no free inodes on the file system on which the symbolic link is being created.
[EDQUOT] The directory in which the entry for the new symbolic link is being placed cannot be extended because the user's quota of
disk blocks on the file system containing the directory has been exhausted.
[EDQUOT] The new symbolic link cannot be created because the user's quota of disk blocks on the file system that will contain the
symbolic link has been exhausted.
[EDQUOT] The user's quota of inodes on the file system on which the user's symbolic link is being created has been exhausted.
[EIO] An I/O error occurred while making the directory entry or allocating the inode.
[ETIMEDOUT] A connect request or remote file operation failed, because the connected party did not properly respond after a period of
time that is dependent on the communications protocol.
See Alsoln(1), link(2), readlink(2), stat(2), unlink(2)symlink(2)