i have this script that searches for a pattern.
However it fails if the pattern includes some
special characters. So far, it fails with the
following strings:
1. -Cr
2. $Mj
3. H'412
would a sed or awk be more effective?
i don't want the users to put the (\)
during the search (they... (5 Replies)
Hi. Does anyone know how to use the sed command to change the special border characters on this .per file. I have to edit about 80 .per files. I need a sed script to change the below 3 and A characters.
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ Test Islands, Office of Public Health -- WIC... (4 Replies)
Hi,
I am reading a file (GC_JAR.log) which has entries like:
511725.629, 0.1122672 secs]
525268.975, 0.1240036 secs]
527181.835, 0.2068215 secs]
527914.287, 0.2884801 secs]
528457.134, 0.2548725 secs]
I want to replace all the entries of "secs]" with just "secs"
Thus, the output... (4 Replies)
Hi everyone
I have file1 contains:
'7832'
' 8765
6543
I want a sed command that will format as:
'7832' , '8765' , '6543'
I tried
sed -e s/\'//g -e 's/^*//;s/*$//' file1 > file2
sed -e :a -e '$!N; s/\n/ /; ta' file2
which gives: 7832 8765 6543
I need some help to continue with... (5 Replies)
Hello All
Seeking the right one SED command.
My attempt is:
From orginal.txt by SED to target.txt
sed -i "/('outbound-callerid/a\$ext->add($context, $exten, '', new ext_SipAddHeader('P-Preferred-Identity', '<sip:${CALLERID(nummer)}@carrier.com>'));" orginal.txtWhat am make wrong?:wall:
... (5 Replies)
Need help in escaping special characters in sed command.
Here is the the string which i am trying to find a replace with
From :- REQUEST_TYPE=PIXEL&MSG_ID={//MESSAGE_ID}
To :- REQUEST_TYPE=PIXEL&MSG_ID= X_EDELIVERY_MESSAGE_ID & BATCH_ID= X_EDELIVERY_BATCH_ID
Here is the sed command i am... (2 Replies)
Hi I'm trying to replace string1 by string2 in file homepage.htm as follows but is not working. Please Help:
sedsed -i "s@'://your server name:port/test/owa'@'://11.22.33.44:5555/pls/SAMPLE'@g" homepage.htm
Where,
String1 ://your server name:port/test/owa
String2... (3 Replies)
Hi,
I have a file with this line, it's always in the first line:
I want to remove these special characters: ´╗┐
file1
´╗┐\\bar\c$\test2\;3.348.118 Bytes;160 ;3
\\bar\c$\test\;35 Bytes;2 ;1
I want the same file to be only
\\bar\c$\test2\;3.348.118 Bytes;160 ;3
\\bar\c$\test\;35... (4 Replies)
I am dusting off the sed cobwebs and had a basic question:
I have a file that contains:
$firewall = "on";
$cache = "on";
$dataset{'mary had a little lamb'} = "on";
and want to only change the contents of what is between the single quotes:
$dataset{'big bad wolf'} = "on";
I... (3 Replies)
I have the foolowing data file:
File1
<p name="A">5004</p>
<p name="B">5004</p>
<p name="C">5004</p>
<p name="A">15004</p>
<p name="B">15004</p>
<p name="C">15004</p>
In a while loop using sed (100 of line need to be replace), I need the output to File3:... (2 Replies)
Discussion started by: bobo
2 Replies
LEARN ABOUT ULTRIX
link
link(2) System Calls Manual link(2)Name
link - link to a file
Syntax
link(name1, name2)
char *name1, *name2;
Description
A hard link to name1 is created; the link has the name name2. The name1 must exist.
With hard links, both name1 and name2 must be in the same file system. Unless the caller is the superuser, name1 must not be a directory.
Both the old and the new share equal access and rights to the underlying object.
Return Values
Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned, and errno is set to indicate the error.
Diagnostics
The system call fails and no link is created under the following conditions:
[ENOTDIR] A component of either path prefix is not a directory.
[ENAMETOOLONG] A component of either pathname exceeded 255 characters, or the entire length of either pathname exceeded 1023 characters.
[ENOENT] A component of either path prefix does not exist.
[ENOENT] The file named by name1 does not exist.
[ENOENT] When name1 or name2 point to an empty string and the environment defined is POSIX or SYSTEM_FIVE.
[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.
[EEXIST] The link named by name2 does exist.
[EPERM] The file named by name1 is a directory, and the effective user ID is not that of superuser or the environment defined is
POSIX.
[EXDEV] The link named by name2 and the file named by name1 are on different file systems.
[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.
[ELOOP] Too many symbolic links were encountered in translating one of the pathnames.
[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.
[ESTALE] The file handle given in the argument is invalid. The file referred to by that file handle no longer exists or has been
revoked.
[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.
[EMLINK] The number of links to the file named by path1 would exceed {LINK_MAX}.
Environment
In the POSIX environment, linking to directories is not allowed.
See Alsosymlink(2), unlink(2)link(2)