10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Input file:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 (6 Replies)
Discussion started by: Sagar Singh
6 Replies
2. Shell Programming and Scripting
Hi,
can I make grep stop after finding the first occurrence of a regex in a line?
Given:
file with various regex patterns
file to be grep'ed
Sadly some of the regex patterns cannot be limited any further, so grep -Eiof patterns.txt file.txt (GNU grep 2.20) will give me possibly n hits... (4 Replies)
Discussion started by: stresing
4 Replies
3. Shell Programming and Scripting
Hello, I have an assignment that requires us to use sed only. The first part of the assignment says to use a sed script to print only the even lines, but if it is print, the number of that lines needs to be printed before the text.
ex:
2
line 2 text
4
line 4 text
6
line 6 text
... (3 Replies)
Discussion started by: stevent518
3 Replies
4. Shell Programming and Scripting
Hi consider the source file
R|field1|field2
using the print statement in awk prints it as
R field1 field2
Is there an easier way to print the whole line in its original format (i.e. with | delimiters) than doing print $1"|"$2"|"$3 ??
Thanks
Storms (1 Reply)
Discussion started by: Storms
1 Replies
5. Shell Programming and Scripting
Hi, how will i show every 3rd line of the file.
Ex.
line 1
line 2
line 3
line 4
line 5
line 6
line 7
Output:
line 2
line 5
line 6
tyhanks
---------- Post updated at 03:39 AM ---------- Previous update was at 03:37 AM ---------- (2 Replies)
Discussion started by: kenshinhimura
2 Replies
6. UNIX for Dummies Questions & Answers
Using the vanilla
ps -ef
I noticed that the CMD (or command) line gets cut off after 90 characters
UID PID PPID C STIME TTY TIME CMD
root 6020 3822 0 Jun 19 ? 0:01 ./webservd-wdog -r /export/opt/sows/61sp4 -d /export/opt/sows/61sp4/https-logse
Googling... (4 Replies)
Discussion started by: SixSigma1978
4 Replies
7. Shell Programming and Scripting
hello,
i have a file "TEST" and want to change the digit(s) after "=" . but i also want to print the old entry with a comment (for information).
i want to use "sed", is it possible ?
file:
TEST = 10 # comment default value: 0
sed , with "p" , i can print the old entry, but i want to... (2 Replies)
Discussion started by: bora99
2 Replies
8. UNIX for Dummies Questions & Answers
# echo $PATH
/home/user01/bin:/usr/local/bin:/usr/bin:/bin:/usr/ccs/bin:/usr/ucb:/dist/perl5/bin:/dist/fsf/bin:.:/usr/dt/bin:/etc/dt/tbin:/usr/openwin/bin
how to show the PATH in separate line, ie:
/home/user01/bin
/usr/local/bin
/usr/bin:/bin
/usr/ccs/bin
/usr/ucb
etc...... (2 Replies)
Discussion started by: userking
2 Replies
9. Shell Programming and Scripting
Hi all,
I have this input file ..
BSS01 107 Swafieh 11/06/2008 12:06:57
BSS01 111 Ramada_Hotel 12/06/2008 11:37:20
BSS01 147 Kalha_Rep 11/06/2008 19:13:39
BSS01 147 Kalha_Rep ... (9 Replies)
Discussion started by: yahyaaa
9 Replies
10. UNIX for Dummies Questions & Answers
Hi everyone,
can you suggest a way fro me to set something up so that i can start mail or mailx and have only the summary line of each email displayed, 24 lines (emails) per page and keep on navigating down throught the summary lines a full page at a time? My users have hundreds of emails ....... (0 Replies)
Discussion started by: gio001
0 Replies