10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
This is my Scenario:
I wanted to check if a particular name or pattern is present in a file based of that rest of the program should proceed.
I want to print '0' if no matching found.
v_File_Count=`grep -i "$v_Name_Pattern" $File_Path/Master_File_List.txt | wc -l` The above command... (5 Replies)
Discussion started by: TechGyaann
5 Replies
2. Shell Programming and Scripting
Hi, all
I have a csv file that I would like to remove duplicate lines based on 1st field and sort them by the 1st field. If there are more than 1 line which is same on the 1st field, I want to keep the first line of them and remove the rest. I think I have to use uniq or something, but I still... (8 Replies)
Discussion started by: refrain
8 Replies
3. Shell Programming and Scripting
How can I find the number of lines in a file excluding lines
starting with #? (4 Replies)
Discussion started by: kristinu
4 Replies
4. Shell Programming and Scripting
I have a text file which has blank lines. I want them to be removed before upload it to DB using SQL *Loader. Below is the command line, i use to remove blank lines.
sed '/^ *$/d' /loc/test.txt
If i use the below command to replace the file after removing the blank lines, it replace the... (6 Replies)
Discussion started by: vel4ever
6 Replies
5. Shell Programming and Scripting
Dears,
i want cut the lines from a log file. Example of the log file as follows..
May 27, 2011 5:54:51 PM com.huawei.ivas.utilities.sm.client.SMDeliverContrUtil isDeliverSM
FINE:
May 27, 2011 5:54:51 PM com.huawei.ivas.utilities.sm.client.SMUtil addSysUpMsgLog
INFO: . The message content... (1 Reply)
Discussion started by: tonypalokkaran
1 Replies
6. Shell Programming and Scripting
I have a file with a list of config files numbered on the lefthand side 1-300. I need to have bash read each lines number and assign it to a variable so it can be chosen by the user called by the script later.
Ex. 1 some data
2 something else
3 more stuff
which number do you... (1 Reply)
Discussion started by: glev2005
1 Replies
7. Shell Programming and Scripting
Sir
I have a data file e.g. DATA31082009. This file consists of several data files appended to that file. The size of each data file is different. The first line of each file starts with "44". I want to grep data from "44" to the preceding line of next "44" and save it as a individual file.... (10 Replies)
Discussion started by: chssastry
10 Replies
8. Shell Programming and Scripting
Let's say I have a word "foobar23" in a file, and I want to pull the first "f" and last "3" character out of the world, how would I accomplish that?
# cat file
foobar23
I want the output to be:
f3 (3 Replies)
Discussion started by: LinuxRacr
3 Replies
9. Shell Programming and Scripting
Hello,
So, I'm not even sure if this will be possible for me to do (then again, that's why I'm asking for help ;) )
What I'm trying to do is pull multiple lines out of a very large text file, separating them into smaller files. Basically it's a text archive of a few hundred emails.
What I... (2 Replies)
Discussion started by: DumDum
2 Replies
10. Shell Programming and Scripting
I saw a few posts close to what i want to do, but they didn't look like they would work exactly.. or I need to think out of the box on this.
I have a file that I keep server stats in for my own performance analysis. this file has the output from many commands in it (uptime, vmstats, ps, swap... (2 Replies)
Discussion started by: MizzGail
2 Replies