08-12-2009
You can use only de redirection of stdout:
$echo "hello" >file;ls -l file
-rw-r--r-- 1 chip chip 6 2009-08-12 11:53 file
$>file
$ls -l file
-rw-r--r-- 1 chip chip 0 2009-08-12 11:53 file
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to write a script that kills old sessions, I've posted here over the past few days and the script is just about perfect except I want to be given the option to exclude specified PIDs from being killed. this is the entire script:
if
then
rm /tmp/idlepids
fi
if
then
rm... (2 Replies)
Discussion started by: raidzero
2 Replies
2. Shell Programming and Scripting
Hello all,
How would I go to a particular line in a file and remove certain text from it and replace with something that I want it to be there.
like: file /etc/abc
now look for line HOME="/export/xyz" in /etc/abc
and then replace with HOME=/"export/xyz1"
thanks in advance guys. (1 Reply)
Discussion started by: solaix14
1 Replies
3. Shell Programming and Scripting
I have a file originally provided from a SQL database on a Windows platform.
I transfer the file via ftp in binary format, remove the ^M's from the end of all lines.
I have attempted to use tr ( cat infile | tr -d '\240' ) and sed (cat infile | sed 's/\240//g' ) to remove the occurences of... (11 Replies)
Discussion started by: pbrowne
11 Replies
4. Shell Programming and Scripting
All,
So, I have an ldif file that contains about 6500 users worth of data. Some users have a block of text I'd like to remove, while some don't.
Example (block of text in question is the block starting with "authAuthority: ;Kerberosv5"):
User with text block:
# username, users,... (7 Replies)
Discussion started by: staze
7 Replies
5. Shell Programming and Scripting
Hello,
I got files full path in a text file like that
/main/k/kdelibs/kdelibs4c2a_3.5.10.dfsg.1-2ubuntu7_i386.deb
/main/k/kdelibs-experimental/libknotificationitem-dev_4.3.2-0ubuntu1_i386.deb
/main/k/kdemultimedia/dragonplayer_4.3.2-0ubuntu1_i386.deb... (13 Replies)
Discussion started by: davidkhan
13 Replies
6. Shell Programming and Scripting
Need help whit a script where I have to input a name and then remove a line where that name is in a file
file ex:
001op;Name;Location;date
002op;Name;Location;date
and so on....
can anybody help me???
thanks (4 Replies)
Discussion started by: nogame11
4 Replies
7. Shell Programming and Scripting
Input file:
'data_1'
'data_10'
'data1311'
'235data_13'
Desired output:
data_1
data_10
data1311
235data_13
Can I know how to remove back tick"'" in a file?
Many thanks for advice. (3 Replies)
Discussion started by: perl_beginner
3 Replies
8. Shell Programming and Scripting
Hello Friends,
I am stuck with the below problem.Any help will be appreciated.
I have a file which has say 100 lines.
On the second last line I have a line from which i want to remove certain characters..
e.g
CAST(CAST( A as varchar(50)) || ',' ||
CAST(CAST( B as varchar(50)) || ',' ||... (8 Replies)
Discussion started by: vital_parsley
8 Replies
9. Shell Programming and Scripting
Trying to use sed to, in-place, remove specific text from a file. Since there are / in the text I use | to escape that character. Thank you :).
sed -i -e 's|xxxx://www.xxx.com/xx/xx/xxx/.*/|' /home/cmccabe/list
sed: -e expression #1, char 51: unterminated `s' command (4 Replies)
Discussion started by: cmccabe
4 Replies
10. Shell Programming and Scripting
Hello experts,
I have a text file with lot of curly brackets (both opening { & closing } ). I need to delete them alongwith the text between opening & closing brackets' pair.
For ex: Input:-
59. Rh1 Qe4 {(Qf5-e4 Qd8-g8+ Kg6-f5
Qg8-h7+ Kf5-e5 Qh7-e7+ Ke5-f5 Qe7-d7+ Qe4-e6 Qd7-h7+ Qe6-g6... (6 Replies)
Discussion started by: prvnrk
6 Replies
MY(4) BSD Kernel Interfaces Manual MY(4)
NAME
my -- Myson Technology Ethernet PCI driver
SYNOPSIS
To compile this driver into the kernel, place the following line in your kernel configuration file:
device my
Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5):
if_my_load="YES"
DESCRIPTION
The my driver provides support for various NICs based on the Myson chipset. The Myson chipset is a variant of the DEC Tulip NIC chipset.
The driver will work with almost any MII-compliant PHY, thus failure to positively identify the chip is not a fatal error.
HARDWARE
The my driver provides support for various NICs based on the Myson chipset. Supported models include:
o Myson MTD800 PCI Fast Ethernet chip
o Myson MTD803 PCI Fast Ethernet chip
o Myson MTD89X PCI Gigabit Ethernet chip
SEE ALSO
altq(4), de(4), netintro(4), pci(4), ifconfig(8)
HISTORY
The my driver first appeared in FreeBSD 4.6.
AUTHORS
The my driver was written by Myson Technology Inc.
This manual page was written by Hiten M. Pandya <hmp@FreeBSD.org>.
BUGS
The my driver does not support Power Management Events (PME).
BSD
March 11, 2007 BSD