10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i have a large file where i want to look for any record that is is larger or smaller than 21 and if it is the case i want to report and break SED .. how can i achieve it ?
i dont want sed to scan the complete file after one non match is found. (4 Replies)
Discussion started by: boncuk
4 Replies
2. Shell Programming and Scripting
Hi, i have file file.txt with data like:
START
03:11:30 a
03:11:40 b
END
START
03:13:30 eee
03:13:35 fff
END
jjjjjjjjjjjjjjjjjjjjj
START
03:14:30 eee
03:15:30 fff
END
ggggggggggg
iiiiiiiiiiiiiiiiiiiiiiiii
I want the below output
START (13 Replies)
Discussion started by: Jyotshna
13 Replies
3. Shell Programming and Scripting
Hi can anyone help with the following:
echo "Date range on 5th May is between -010516 and 050516- please continue "| sed 's/\(.*-\)\(.*-\)\(.*$\)/\2/'
output
010516 and 050516-
What i need is to include the - to be included.
Desired output:
-010516 and 050516-
I know... (11 Replies)
Discussion started by: andy391791
11 Replies
4. Shell Programming and Scripting
Hi Guys,
I need a help on writing shell scripting where I am stuck on finding keyword after a grep match.
file.log (sample)
line1 -> ppp dfasf adgasg session out sfsgsgsghsgh
line2 -> sdaf agasg sessionid: 1234Nhsh34 sdagsjhsh srhs
line3 -> sdgshytnba sessionid: 453omgt thdjdh gfhjdj... (19 Replies)
Discussion started by: TCS
19 Replies
5. UNIX for Dummies Questions & Answers
Hi:
it seems very strange.
there is a file with multiple lines. After I squeezed out the consecutive blank lines (and some other text processing), somehow the
sed '/\n/! d' file
can not generate any output, as if it can't find any line with newline.
the file is has many lines, so... (9 Replies)
Discussion started by: phil518
9 Replies
6. Shell Programming and Scripting
I am using csh and getting the error "find: No match." but I cannot figure out why. What I am trying to do is set the find command to a variable and then execute the variable as a command. I ran it through a debugger and it looks like $FIND is getting set but the find command can not actually be... (2 Replies)
Discussion started by: mst3k4l
2 Replies
7. Shell Programming and Scripting
Hi All,
I have a below file:
==================
02:53 pravin-root
02:53 pravin-root
03:05 pravin-root
02:55 pravin1-root
02:59 pravin1-root
==================
How do I find the first and last value of column 1. For example, how do I find 02:53 is the first time stamp and 03:05 is... (3 Replies)
Discussion started by: praving5
3 Replies
8. UNIX for Dummies Questions & Answers
Hi,
Can anyone help me with the text editing I need here. I have a file that contains the following lines for example: (line numbers are for illustration only)
1 Hello world fantasy.
2 Hello worldfuntastic.
3 Hello world wonderful.
I would like to get all those lines of text that... (5 Replies)
Discussion started by: risk_sly
5 Replies
9. Shell Programming and Scripting
I am searching a dhcpd.conf to find the hardware ethernet match, then once the match is found delete just the line above it. For example:
testmachine.example {
hardware ethernet 00:00:00:00:00:00;
fixed address 192.168.1.100;
next-server 192.168.1.101;
filename "linux-install/pxelinux.0";
}... (3 Replies)
Discussion started by: cstovall
3 Replies
10. Shell Programming and Scripting
I have a text file that has links in it.
I can write a match for sed to replace the link with anything.
For example:
http://www.google.com
becomes
XxX
But what I'm after is not to replace the link with something but to remove everything else and just leave the link. I want a... (5 Replies)
Discussion started by: muxman
5 Replies