10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have the file:
s3_T0(2) Pos "1" "2"
s1_T1(2) Pos "1" "2"
---
0 0
1 0
0 1
1 1
---
1 2 "tau0"
1 2 "h10"
I want to patternmatch on ---
and get only the third part i.e.
1 2 "tau0"
1 2 "h10"
I wanted to start simple but even something like (5 Replies)
Discussion started by: eagle_fly
5 Replies
2. Shell Programming and Scripting
Hi All,
I am trying to fetch the particular content from the result of grep command.
I am using
ps-ef |grep engine| awk '{print $6}'
above statement giving me
/opt/test/user/domain/CORPTEST/application/CacheScheduler/CacheScheduler-CacheScheduler
but I want (13 Replies)
Discussion started by: sharsour
13 Replies
3. Shell Programming and Scripting
I have a file containing texts and indexes. I need the text between (and including ) INDEX and number "1" alone in line. I have managed this:
awk '/INDEX/,/1$/{if (!/1$/)print}' file1.txt
It works for all indexes.
And then I have second file with years and indexes per year, one per line... (3 Replies)
Discussion started by: phoebus
3 Replies
4. Shell Programming and Scripting
here below is a part of the file
cat fileName.txt
NAME=APP-VA-va_mediaservices-113009-VA_MS_MEDIA_SERVER_NOT_PRESENT-S
FIXED=false
DATE= 2013-02-19 03:46:04.4
PRIORITY=HIGH
RESOURCE NAME=ccm113
NAME=APP-DS-ds_ha-140020-databaseReplicationFailure-S
FIXED=false
DATE= 2013-02-19... (4 Replies)
Discussion started by: vivek d r
4 Replies
5. Shell Programming and Scripting
cat fileanme.txt
custom1=, custom2=, userPulseId=3005, accountPolicyId=1, custom3=, custom4=, homeLocationId=0, i need to make the fields appear in next line based on identifier (,) ie comma
so output should read
cat fileanme.txt
custom1=,
custom2=,
userPulseId=3005,
... (8 Replies)
Discussion started by: vivek d r
8 Replies
6. Shell Programming and Scripting
I was wondering if it was possible to grep a pattern based on the surround text. For example, if i have an input file like this:
titleA
titleB
titlex
titleC
titleD
titlex
titleE
And I want to grep "title" and save the results only if it is not followed with a "titlex". My output... (14 Replies)
Discussion started by: jl487
14 Replies
7. Shell Programming and Scripting
consider the following is the contents of the file
cat 11.sql
drop procedure if exists hoop1 ;
Delimiter $$
CREATE PROCEDURE hoop1(id int)
BEGIN
END
$$
Delimiter ;
.
.
.
.
drop procedure if exists hoop2;
Delimiter $$
CREATE PROCEDURE hoop2(id int)
BEGIN
END
$$ (8 Replies)
Discussion started by: vivek d r
8 Replies
8. Shell Programming and Scripting
i have something like this in a file called mysqldump.sql
--
-- Table structure for table `Table11`
--
DROP TABLE IF EXISTS `Table11`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Table11` (
`id` int(11) NOT NULL... (14 Replies)
Discussion started by: vivek d r
14 Replies
9. Shell Programming and Scripting
HI,
Need awk command to get date and time alone from
Input : "15:29:15 28.08.2010|SCHEDULE: Started program POSG1"
Output expected : "15:29:15 28.08.2010"
Please help. (9 Replies)
Discussion started by: shanneykar
9 Replies
10. Shell Programming and Scripting
hey gurus,
my-build1-abc
my-build10-abc
my-build2-abc
my-build22-abc
my-build3-abc
basically i want to numerically sort the entire lines based on the build number. I dont zero pad the numbers because thats "how it is" ;-)
sort -n won't work because it starts from the beginning.
... (10 Replies)
Discussion started by: gurpal2000
10 Replies