10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
when given a file name, im looking for the most efficient way to turn each letter of the file name into spaces.
for instance, the way im thinking of going about this is this:
MYFILE=check_disks.sh
CHANUM=$(echo ${MYFILE} | awk '{ print length }')
printf '%s\n' $CHANUM
as you can see... (4 Replies)
Discussion started by: SkySmart
4 Replies
2. UNIX for Dummies Questions & Answers
please let me know how to construct if then else by comparing two numbers if it is greater than 10000. I need to do some specific task executed.
can you help me out in shell scripting plz. (6 Replies)
Discussion started by: ramkumar15
6 Replies
3. Shell Programming and Scripting
Hi there,
I have a script that I've used to find errors in my Minecraft Server logs. But I'd like to refine that script to be more useful.
Here is the script:
grep -n "SEVERE" /minecraft/server.log | awk -F":" '{print $1-2 "," $1+10 "p"}' | xargs -t -i sed -n {} /minecraft/server.log >>... (15 Replies)
Discussion started by: nbsparks
15 Replies
4. UNIX for Dummies Questions & Answers
Hi all,
I'm working on ppp establishment. When I tried calling a number using ppp, I could establish a PPP connection successfully. But, when I tried calling another ISP number, it is asking for authentication details whereas that is not the case with the other number. It throws an error saying... (0 Replies)
Discussion started by: sai2krishna
0 Replies
5. Shell Programming and Scripting
I want get a number(ID) from a sentence which has been grepped from file using error number.
For Example:
#!/bin/ksh
echo "Enter RRS ID: "
read rrs
echo "Enter error number:"
read err
scp -pr ptc-avdbamdw102:/home/icsprd/M3logs/Accurate/logs/corp_post/$rrs.*.err.txt $HOME/daemon_mail/... (7 Replies)
Discussion started by: JayDoshi
7 Replies
6. Shell Programming and Scripting
I would like to check with grep in this configuration file:
{
"alt-speed-down": 200,
"alt-speed-enabled": true,
"alt-speed-time-begin": 1140,
"alt-speed-time-day": 127,
"...something..." : true,
...
}
"alt-speed-enabled" (the third line of the file) is setted to... (2 Replies)
Discussion started by: ciro314
2 Replies
7. UNIX for Dummies Questions & Answers
Hi People,
I need some Help to write a unix script that asks for a sentence to be typed out then with the sentence. Counts the number of spaces within the sentence and then echo's out "The Number Of Spaces In The Sentence is 4" as a example
Thanks
Danielle (12 Replies)
Discussion started by: charlie101208
12 Replies
8. Shell Programming and Scripting
Hi all
I want to count total numbers of sentences separated by fullstop (.) in different files under a directory at one go. Any help is appreciated. (3 Replies)
Discussion started by: my_Perl
3 Replies
9. Shell Programming and Scripting
using sed to replace a specific string on a specific line number using variables
this is where i am at
grep -v WARNING output | grep -v spawn | grep -v Passphrase | grep -v Authentication | grep -v '/sbin/tfadmin netguard -C'| grep -v 'NETWORK>' >> output.clean
grep -n Destination... (2 Replies)
Discussion started by: todd.cutting
2 Replies
10. Shell Programming and Scripting
Hi,
I have a huge file & I want to add a specific text in column. But I want to add this text from a specific line number to a specific line number & another text in to another range of line numbers.
To be more specific: lets say my file has 1000 lines & 4 Columns. I want to add text "Hello"... (2 Replies)
Discussion started by: Ezy
2 Replies