10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Morning ..
I have a file with approximately 1000 lines. I want to check that the file contains, for example, 100 lines.
Something like whats given below is ugly. And even if I create a function I have to call it 100 times.
I may need to look through multiple files at times.
Is there a... (4 Replies)
Discussion started by: sumguy
4 Replies
2. UNIX for Dummies Questions & Answers
I am trying to remove columns 81-97 from a line that can be as long as 114 characters. Because a number of lines might not have under 80 characters, using the cut command following by paste could be a problem. While sed might work, is there some other utility that could do this more easily?
... (9 Replies)
Discussion started by: wbport
9 Replies
3. Shell Programming and Scripting
Hi
This is my first post and I'm just a beginner. So please be nice to me.
I have a couple of html files where a pattern beginning with "http://www.site.com" and ending with "/resource.dat" is present on every 241st line. How do I extract this to a new text file?
I have tried sed -n 241,241p... (13 Replies)
Discussion started by: dejavo
13 Replies
4. Shell Programming and Scripting
Hi am trying to write a script which find the existence of a file from a find command output and perform a task if the file exists. Help me out with the correct syntax . Am trying with the following one but unable to get the output.
if
then <some tasks>
else
echo "file not exists"
fi (5 Replies)
Discussion started by: rogerben
5 Replies
5. Shell Programming and Scripting
Hi, i have a file containing nrows and 3cols. i want to cut it in specific length and save output to individual files.
1 2 3
4 5 6
5 8 9
10 11 12
13 14 15
16 17 18
i need to cut the file say every 2 rows and save it in individual file.
01.dat contains
1 2 3
4 5 6
02.dat
7 8 9... (10 Replies)
Discussion started by: ida1215
10 Replies
6. Shell Programming and Scripting
Problem :
I want to create a separate file for country list if condition is true. Please help.
*****************************************************
Input file:
SV-INCR-139302-365540488-201104090934.sqllog
SV-INCR-1082-552793184-201104040805.sqllog
SV-INCR-1077-855045741-201104040805.sqllog... (4 Replies)
Discussion started by: humaemo
4 Replies
7. Shell Programming and Scripting
Hi.. Gurus
I Have a list of .zip files in a directory. I want to check whether each .zip file having some particular file or not (say .jsp) if it's having .Jsp file then create a directory as per the .zip file and extract the content to that directory except the .jsp file, If .zip not having... (3 Replies)
Discussion started by: posix
3 Replies
8. Shell Programming and Scripting
Hi,
I have a file named Mani.txt. The contents are like this
cat Mani.txt
--------------------------------------------------------
Hi there how r u
My Name is Mani
Bye
------------------------------------------------------------
I want to cut the first and last lines from the file... (15 Replies)
Discussion started by: pathanjalireddy
15 Replies
9. Shell Programming and Scripting
First I have to say thank you to this community and this forum. You helped me very much builing several useful scripts.
Now, I can't get a solution the following problem, I'm stuck somehow. Maybe someone has an idea.
In short, I dump a site via lynx and pipe the output in a file. I need to... (7 Replies)
Discussion started by: lowmaster
7 Replies
10. Shell Programming and Scripting
Hi falks,
I have the following configuration file structure:
file1:N
file2:Y
file3:Y
file4:N
......
I need to cut from the configuration file only the file with the sign "Y" in the end and copy it to some directory.
What is the best way to do it?
Thanks in advance,
Nir (8 Replies)
Discussion started by: nir_s
8 Replies