10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi everyone
Need to get version of npm application that have several output like this:
root: nmp -version
10
root: nmp -version
10
root: nmp-new -version
3.1
root: nmp-old -version
Segmentation fault
count them , after that write to the file like this:
10 2
3.1 1 (1 Reply)
Discussion started by: indeed_1
1 Replies
2. Shell Programming and Scripting
dear all
Hi
i want write a script can count number of my log file and every 5min run script for cgk log file for find a specific word such as Error
for example in first 5 min we have 500 line in my log file and in second 5min we have 2500 line in my log file how can chk error word in my log... (4 Replies)
Discussion started by: Baber
4 Replies
3. Shell Programming and Scripting
Hello,
I have been working on Awk/sed one liner which counts the number of occurrences of '|' in pipe separated lines of file and delete the line from files if count exceeds "17".
i.e need to get records having exact 17 pipe separated fields(no more or less)
currently i have below :
awk... (1 Reply)
Discussion started by: ketanraut
1 Replies
4. Shell Programming and Scripting
What I'm trying to accomplish. I receive a Header and Detail file for daily processing. The detail file comes first which holds data, the header is a receipt of the detail file and has the detail files record count. Before processing the detail file I would like to put a wrapper around another... (4 Replies)
Discussion started by: pone2332
4 Replies
5. UNIX for Dummies Questions & Answers
Suppose i have multiple line like below in a file.
ASDFAFAGAHAHAHA
AGAHAHAJGAFAGAH
AHAHAKAHAHAHAKA
I need a bash script to count a character and also Also count the number of character present in each line .
suppose for line 1: A=x, S=y, D=x and so on and total character=15. where x y and z is... (3 Replies)
Discussion started by: XXLMMN
3 Replies
6. Shell Programming and Scripting
Hi,
I have created one shell script in which it will count number of "~" tilda charactors from each line of the file.But the problem is that i need to count each line count individually, that means. if line one contains 14 "~"s and line two contains 15 "~"s then it should give an error msg.each... (3 Replies)
Discussion started by: Ganesh Khandare
3 Replies
7. Shell Programming and Scripting
guys,
I am new shelll scripting..
this a question on passt exam paper, I was trying to solve it , I can not.
the question is as follow?
a. Write a shell script to count the number of accounts which belong to particular primary group in a standard UNIX system which uses local... (1 Reply)
Discussion started by: gurmad
1 Replies
8. Shell Programming and Scripting
hello everyone,
I'm trying to learn some scripts but i cant get my head around two of them.
1. how can i write a script that will count the number of times a particular word is used in file?
2. how can i make a script that will take me to a web page from unix?
if anyone could help it... (3 Replies)
Discussion started by: BigTool4u2
3 Replies
9. Shell Programming and Scripting
Hi,
I have a file lets say FILE1.
FILE1
------
name,age
charlie,25
harry,29
david,32
Pls help me writing a mailing script.... which will mail the content of file in the body of the mail & it will look something like below in two columns.
name age
charlie 25
harry 29... (1 Reply)
Discussion started by: 46019
1 Replies
10. Shell Programming and Scripting
I have to compare the number of files of two files on a Shell Script:
I tryied with wc and wiith sed but I can not make an integer...
#!/bin/sh
.
.
n = ls -l | wc -l $file1
`echo "Line: "$n". ">>$LOGFILE`
xx = sed -n '$=' $file2
`echo "Line: "$xx". ">>$LOGFILE`
Aways... (4 Replies)
Discussion started by: fafo77
4 Replies