10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to delete below linux using sed command but I am getting error.sed -i '/url=/status.cgi?hostgroup=/d' 3
error:sed: -e expression #1, char 32: unknown option to `s'
Could you please help me with correct syntax.
My line contain / character because of that I am getting... (4 Replies)
Discussion started by: ghpradeep
2. UNIX for Dummies Questions & Answers
How can i display the middle line of a file using a single line command? (6 Replies)
Discussion started by: Lakme Pemmaiah
3. Shell Programming and Scripting
here is what i want to achieve.. i have a file with below contents
blah blah blah
--sport 7800 -j REJECT --reject-with icmp-port-unreachable
--dport 7800 -j REJECT --reject-with icmp-port-unreachable
more blah blah blah
--dport 3306... (14 Replies)
Discussion started by: vivek d r
4. Red Hat
Linux: Fedora Core release 1 (Yarrow)
Log Path: /usr/iplanet/servers/https-company/logs
I have iPlanet log rotation enabled rotating files on a daily basis.
The rotated logs are NOT compressed & are taking up too much space.
I... (7 Replies)
Discussion started by: zachs
5. Shell Programming and Scripting
I want to delete all lines with given string in file1 and the string val is dynamic.
Can this be done using sed command.
vars="test twinning yellow"
for i in $vars
grep $i file1
echo "Do Nothing"
sed `/$i/d` file1
Using the above... (5 Replies)
Discussion started by: PrasadAruna
6. Shell Programming and Scripting
I'm trying to acheive the following, I have a dat file in which i have several addresses, If the address starts with a single digit then i have to delete the line,
if it starts with 2 or more digits then i have to keep the line
Here is a sample of my file:
377 CARRER DE LA... (5 Replies)
Discussion started by: ramky79
7. UNIX for Dummies Questions & Answers
1) I wrote a script and gave the desired permissions using "chmod 755 scriptname". Now if i edit the script file, why do i need to set the permission again? Didn't i set the permission attribute.. or if i edit the file, does the inode number of file changes?
2) I am running my unix on a server... (1 Reply)
Discussion started by: animesharma
8. Shell Programming and Scripting
hi i have a line like
TL1330000000800 000DE9248737900 08000TS0231DE92 87379AMEX0000.T N 0080000000 00000.
if there any single space between strings, i need to delete, if more than one keep the space as it is
can some one help
Satya (1 Reply)
Discussion started by: Satyak
9. Shell Programming and Scripting
My log files stored in the date format format below(log_20080714072942):
I'm looking for a shell script which deletes all files which is older than 3 months from today.
Bhagat (3 Replies)
Discussion started by: bhagat.singh-j
10. Shell Programming and Scripting
Hello everyone. I have been reading a lot about the various different text editors at my disposal through Unix, but I just can't seem to close the deal for what I am trying to do. Is there a way to issue a single line command to edit a file where pattern=x, and do it non-destructively AND in-place?... (1 Reply)
Discussion started by: gator76