Hi All,
I want to merge two lines in a file till the end of the file. So what could be the command to get so.
say file name : sample.txt
contents:
country=1
send apps =1 rece=2
country=2
send apps =3 rece=3
..
...
output:
country=1;send apps =1 rece=2
country=2;send apps =3... (6 Replies)
I need to write a script that reads through an input .txt file and replaces the end value with the end value of the next line for lines that have distance <=4000. The first label line is not actually in the input. In the below example, 3217 is the distance from the end of the first line to the... (12 Replies)
Hi,
Is there any way to merge two lines based on specific occurance of a character in a file.
I am having a flat file which contains multiple records.
Each row in the file should contain specified number of delimiter.
For a particular row , if the delimiter count is not matched with... (2 Replies)
hi,
I have a file as below:
Name: some_name
Date: some_date
Function Name: <some_function_name(jjjjjjjjj,
fjddddd, gggg, ggg)>
Changes:<Change A
more of change A>
Name: some_name
Date: some_date
Function Name: some_function_nameB(jjjjjjjjj,
fjddddd, gggg, ggg)
Changes:Change B... (15 Replies)
Hi ,
I'm looking for a way to merge two lines only for a given pattern / condition.
Input :
abcd/dad + -49.201 2.09 -49.5 34 ewrew rewtre *
fdsgfds/dsgf/sdfdsfasdd +
-4.30 0.62 -49.5 45 sdfdsf cvbbv *
sdfds/retret/asdsaddsa +
... (1 Reply)
Hi everyone,
I have two files (A and B) and want to combine them to one by always taking 10 rows from file A and subsequently 6 lines from file B. This process shall be repeated 40 times (file A = 400 lines; file B = 240 lines).
Does anybody have an idea how to do that using perl, awk or sed?... (6 Replies)
Thanks it worked for me. I have one more question on top of that. We had few records which were splitted in 2 lines instead of one. Now i identified those lines. The file is too big to open via vi and edit it. How can i do it without opening the file.
Suppose, I want line number 1001 & 1002 to... (2 Replies)
I have been working of this script for a very long time and I have searched the internet for direction but I am stuck here.
I have about 3000 files with two columns each. The length of each file is 50000. Each of these files is named this way b.4, b.5, b.6, b.7, b.8, b.9, b.10, b.11, b.12... (10 Replies)
Hello,
I have a file with few lines starting with a digit (1-5 only ) followed by a dot (.). Remaining all the lines to be merged with its previous numbered lines. Merging must be done with a space.
E.g.,
Source file:
3. abc def
xyz
5. pqr mno
def
4. jkl uvw
7. ghi
1. abc xyz
6. mno... (4 Replies)
Hello all,
I have a large csv file where there are four types of rows I need to merge into one row per person, where there is a column for each possible code / type of row, even if that code/row isn't there for that person.
In the csv, a person may be listed from one to four times... (9 Replies)
Discussion started by: RalphNY
9 Replies
LEARN ABOUT BSD
link
LINK(2) System Calls Manual LINK(2)NAME
link - make a hard link to a file
SYNOPSIS
link(name1, name2)
char *name1, *name2;
DESCRIPTION
A hard link to name1 is created; the link has the name name2. Name1 must exist.
With hard links, both name1 and name2 must be in the same file system. Unless the caller is the super-user, name1 must not be a directory.
Both the old and the new link share equal access and rights to the underlying object.
RETURN VALUE
Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and errno is set to indicate the error.
ERRORS
Link will fail and no link will be created if one or more of the following are true:
[ENOTDIR] A component of either path prefix is not a directory.
[EINVAL] Either pathname contains a character with the high-order bit set.
[ENAMETOOLONG] A component of either pathname exceeded 255 characters, or entire length of either path name exceeded 1023 characters.
[ENOENT] A component of either path prefix does not exist.
[EACCES] A component of either path prefix denies search permission.
[EACCES] The requested link requires writing in a directory with a mode that denies write permission.
[ELOOP] Too many symbolic links were encountered in translating one of the pathnames.
[ENOENT] The file named by name1 does not exist.
[EEXIST] The link named by name2 does exist.
[EPERM] The file named by name1 is a directory and the effective user ID is not super-user.
[EXDEV] The link named by name2 and the file named by name1 are on different file systems.
[ENOSPC] The directory in which the entry for the new link is being placed cannot be extended because there is no space left on the
file system containing the directory.
[EDQUOT] The directory in which the entry for the new 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.
[EIO] An I/O error occurred while reading from or writing to the file system to make the directory entry.
[EROFS] The requested link requires writing in a directory on a read-only file system.
[EFAULT] One of the pathnames specified is outside the process's allocated address space.
SEE ALSO symlink(2), unlink(2)4th Berkeley Distribution August 26, 1985 LINK(2)