I've written a small script to replace certain words in all the the files in a directory.
Now, when I run this script as a normal user, only the first 4kB of the file is processed. So all files larger than 4kB are cut in half. The remaining bytes are just left out of the new file. When I ran the script as root, 8kB were processed. Is there a way to process the entire files?
When I cat a large text file the entire file gets printed on my screen.
Hi gurus.
I implemented sudo and have the following in my sudo config file
***************
# User alias specification
User_Alias VENDOR = user1
# User privilege specification
VENDOR ALL = NOPASSWD: /bin/, /sbin/, /usr/local/bin/, \
!/bin/su,... (1 Reply)
$ echo a.bc | sed -e "s/\|/\\|/g"
|a|.|b|c|
$
Is the behavior of the sed statement expected ? Or is this a bug in sed ?
OS details
Linux 2.6.9-55.0.0.0.2.ELsmp #1 SMP Wed May 2 14:59:56 PDT 2007 i686 i686 i386 GNU/Linux (8 Replies)
I have a file called merge2.t:
Hi
Hello how are you.
</Endtag> <New> I am fine.</New>
This is a test.
freelong
how
Here is the SED:
sed -n ' /<\/Endtag>/ !{
H
}
/<\/Endtag>/ {
x
p
} (4 Replies)
Hi all,
I want to do a very simple thing with sed. I want to print out the line number of a disk I have defined in /etc/exports, so I do:
It's all good, but here's the problem. When I define md0 in a variable, I get nothing from sed:
Why is that? can anybody please help?
Thanks (2 Replies)
This is my first post so hi to you all. I have browsed these forums in the past and what a great community and resource this is! Thanks to all the contributors ... I look forward to being able to give something back.
In the meantime, I have a little conundrum concerning sed. My very simple... (6 Replies)
Hello,
I am getting an infinite loop from a script in Linux.
Here is the last version of the script in question. As you can see I tried to define everything properly:
#!/bin/ksh
# Script to loop over a series of dates
set -ex
typeset -i start_date=20090701
typeset -i... (2 Replies)
I have these two files in current dir:
oos.txt
oos_(copy).txt
I execute this find command:find . -regex './oos*.txt'And this outputs only the first file (oos.txt)! :confused:
Only if I add another asterisk to the find find . -regex './oos*.*txt' do I also get the second file... (7 Replies)
I am little bit confused by the behaviour of rm in Ubuntu.
It seems that as a regular user I can delete files owned by another user even when the permissions are set to 644.
Here is an example:
cjohnson@carbon:~/test$ sudo touch testfile
cjohnson@carbon:~/test$ ls -al
total 8
drwxr-xr-x... (2 Replies)
Linux. Bash 4.2.10.
Let's say that i want the stderr of a command redirected to one file (err), and both stdout and stderr redirected to another file (outanderr).
Easy. Many ways to do it. But may times the file outanderr will be messed up (with the output and the error mixed toghether).
... (3 Replies)
Hi there.
I'm facing a strange & an intriguing behaviour with sed while replacing the tab character with a space reading from a file. It randomly works sometimes but mostly doesn't work.
Below is what's happening-
<tab> here is the actual literal tab.
user1> cat temp2
1<tab>2<tab>3 4... (2 Replies)