Hi,
I need to redirect the lines in a file to a different file if the character starting from 2 to 6 in the line are numerical .
Please let me know if anyone have any script to do this.
Thanks,
Ranjit (4 Replies)
I have a text file, a sample of which is as follows:
r/- * 0: WINDOWS/Microsoft.NET/Framework/v2.0.50727/ASP.NETWebAdminFiles/Images/headerGRADIENT_Tall.gif
r/- * 0: WINDOWS/SoftwareDistribution/Download/cf8ec753e88561d2ddb53e183dc05c3e/backoff.jpg
r/- * 0: ... (2 Replies)
Hi,
I am new to ksh scripting and I have a problem.
I have a file in which I have to search for a particular pattern say 'a' then from that line I need to search for another pattern say 'b' in the previous lines and thne print the file from pattern 'b' till the end of file.
For eg:
... (2 Replies)
hiii,
i have to write a shell script like this----
i have a huge log file name abc.log .i have to search for a pattern name "pattern",it may occur 1000 times in the log file,every time it finds the pattern it should display the 10 lines above the pattern.
I appericiate your help. (30 Replies)
Hi Guys,
Was trying to attempt the below using awk and sed, have no luck so far, so any help would be appreciated.
Current Text File: The first line has got an "\n", and the second line has got spaces/tabs then the word and "\n"
TIME SERVER/CLIENT TEXT... (6 Replies)
Hi guys,
i have the follow problem i need to delete 10 row before the pattern and 1 after and the pattern row itself.
file looks like:
frect 9.8438 25.8681 10.625 25
. dynprop \
(# \
(call fox_execute(__self))) \
(FOX_VAR_29 \
... (4 Replies)
Hi all,
on Solaris 10, I'd like to print a range of lines starting at pattern but also including the very first line before pattern.
the following doesn't print the range starting at pattern and going down to the end of file: cat <my file> | sed -n -e '/<pattern>{x;p;}/'
I need to include the... (1 Reply)
I need to search for two patterns in a file and find number of matching lines.
find . -type f | xargs grep "DROP TABLE" | wc -l
find . -type f | xargs grep "DROP SYNONYM" | wc -l
The above code works. However I am looking at finding a commnd that will simplify as on a singe command... (2 Replies)
Hi all,
I want to search for strings in file1 that can be found in file2 and print out the whole line when matching pattern is found.
I have used the below command, but this is not working for me, because it is writing out only the matching patterns from file2, not the whole line.
fgrep -o... (2 Replies)
Dear Community;
I am posting this after looking at several solutions that were not fully relevant to the issue that I am facing.
I have a large xml file, 100k+ lines which have patterns like below:
<OfferDefinition Id="11">
<Type>Account</Type>
... (3 Replies)
Discussion started by: mystition
3 Replies
LEARN ABOUT DEBIAN
ip-netns
IP-NETNS(8) Linux IP-NETNS(8)NAME
ip-netns - process network namespace management
SYNOPSIS
ip [ OPTIONS ] netns { COMMAND | help }
ip netns { list }
ip netns { add | delete } NETNSNAME
ip netns exec NETNSNAME command ...
DESCRIPTION
A network namespace is logically another copy of the network stack, with it's own routes, firewall rules, and network devices.
By convention a named network namespace is an object at /var/run/netns/NAME that can be opened. The file descriptor resulting from opening
/var/run/netns/NAME refers to the specified network namespace. Holding that file descriptor open keeps the network namespace alive. The
file descriptor can be used with the setns(2) system call to change the network namespace associated with a task.
The convention for network namespace aware applications is to look for global network configuration files first in /etc/netns/NAME/ then in
/etc/. For example, if you want a different version of /etc/resolv.conf for a network namespace used to isolate your vpn you would name it
/etc/netns/myvpn/resolv.conf.
ip netns exec automates handling of this configuration, file convention for network namespace unaware applications, by creating a mount
namespace and bind mounting all of the per network namespace configure files into their traditional location in /etc.
ip netns list - show all of the named network namespaces
ip netns add NAME - create a new named network namespace
ip netns delete NAME - delete the name of a network namespace
ip netns exec NAME cmd ... - Run cmd in the named network namespace
EXAMPLES SEE ALSO ip(8)AUTHOR
Original Manpage by Eric W. Biederman
iproute2 20 Dec 2011 IP-NETNS(8)