10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi guys,
Hope someone can help me with this - I'm sure it's fairly simple but it's driving me mad! (forgive the coding - still new on scripting - come from Windows)
I have the following coding for checking whether I want to include a line in a file:-
EXTRACT_Date=$(date --date="${PERIOD}"... (6 Replies)
Discussion started by: NickF
6 Replies
2. Shell Programming and Scripting
Hello, I have an input file that looks like so:
LDLR
LDLRAD4
VLDLR
when I grep "LDLR" I get an output of:
LDLR
LDLRAD4
VLDLR
Since all names have "LDLR" included within them, but all I want the output to be is
LDLR
I know it can work if I surround the words with pipes for... (5 Replies)
Discussion started by: Rabu
5 Replies
3. UNIX for Dummies Questions & Answers
HI,
I have a command to check a license file.
License_print.
In that file you get the headlines and all different licenses.
Now i want to have things extracted from it.
so i do like following:
license_print | grep -iw -e "user" -e "admin"
But i donīt want all lines where user is... (11 Replies)
Discussion started by: Tzwaj
11 Replies
4. Shell Programming and Scripting
i have following pattern in file
s6:s2
s2:s4
s1:s2:s3:s4:s5:s6
s1
.
.
Now i want to find occurence of each record in file like s6:s2 occurs twice {once in first record and both occur in 3 record as well}
so output should be
s6:s2 2
s2:s4 2
s1:s2:s3:s4:s5:s6 :1
s1 : 2
... (7 Replies)
Discussion started by: sharad.40216
7 Replies
5. Shell Programming and Scripting
Hi All
I have a file containing following records:
$HEW_TGT_DB2_USER=hbme_bi2
$prmAttunityUser=ais
$DS_USER=hbme_bi2
$prmStgUser=hbme_bi2
$prmuser=hbme_bi2
$prmStgPass=hbme_bi2
$prmpwd=hbme_bi2
$prmAttunityUser=ais
Say suppose the name of the file is test4.txt
When i fire this... (2 Replies)
Discussion started by: vee_789
2 Replies
6. UNIX for Dummies Questions & Answers
more Hello.txt
it was a sunny way and i was about to go home.
I need to grep and redirect to a new file all the text between 'sunny' and 'go' string above.
Note: There may be multiple lines in between the string i need to grep between. If there are multiple 'go' strings it should grep till... (9 Replies)
Discussion started by: mohtashims
9 Replies
7. Shell Programming and Scripting
The below command is not working
stackmem="$(pmap $1 | grep -i '' | awk '{print $2}'| tr -d ' K')"
I need to grep strictly for ---->
Regards,
Mohtashim (2 Replies)
Discussion started by: mohtashims
2 Replies
8. Shell Programming and Scripting
<record>
<set>
<termId>1234</termId>
<termType>First</termType>
</set>
<set>
<termId>5678</termId>
<termType>Second</termType>
</set>
</record>
This is saved in record.xml
Hi
I have this sample XML that i am grepping using a shell program.
The objective of the task is - based... (7 Replies)
Discussion started by: revertback
7 Replies
9. UNIX for Dummies Questions & Answers
I have a file that has the following:
591066 100.0
591066 100.0
591066 100.0
591066 100.0
591066 100.0
591066 100.0
591066 100.0
591066 100.0
591066 100.0
591066 100.0
591066 100.0
... (5 Replies)
Discussion started by: Pablo_beezo
5 Replies
10. UNIX for Dummies Questions & Answers
using grep, i have a file emp.lst, and i want all those records
where "S" or "s" (capital or small) is not there
i used this
grep emp.lst
when i use grep emp.lst
i am getting rows with S..but why negate (^) is not working? (3 Replies)
Discussion started by: soujanya_srk
3 Replies
script(1) User Commands script(1)
NAME
script - make record of a terminal session
SYNOPSIS
script [-a] [filename]
DESCRIPTION
The script utility makes a record of everything printed on your screen. The record is written to filename. If no file name is given, the
record is saved in the file typescript. See WARNINGS.
The script command forks and creates a sub-shell, according to the value of $SHELL, and records the text from this session. The script ends
when the forked shell exits or when Control-d is typed.
OPTIONS
The following option is supported:
-a Appends the session record to filename, rather than overwriting it.
NOTES
script places everything that appears on the screen in filename, including prompts.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|CSI |Enabled |
+-----------------------------+-----------------------------+
SEE ALSO
attributes(5)
WARNINGS
script can pose a security risk when used in directories that are writable by other users (for example, /tmp), especially when run by a
privileged user, that is, root. Be sure that typescript is not a link before running script.
SunOS 5.10 30 Jan 2004 script(1)