9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I want to use awk to match where field 3 contains a number within string - then print the line and just the number as a new field.
The source file is pipe delimited and looks something like
1|net|ABC Letr1|1530|||
1|net|EXP_1040 ABC|1121|||
1|net|EXP_TG1224|1122|||
1|net|R_North|1123|||... (5 Replies)
Discussion started by: Mudshark
5 Replies
2. UNIX for Dummies Questions & Answers
I need to write a BASH script that takes a 2 character string and removes the second character if it is not a digit e.g.
If the string is numberical value >9 e.g. string1 = '34' then leave string1 = '34'.
However if the string is <10 e.g. string1 = '3X' then remove the second char (which... (7 Replies)
Discussion started by: millsy5
7 Replies
3. Shell Programming and Scripting
hi,
i having a file with | seperated in which i need to search char in 3rd column and replace with null. i need to replace only the coulmn where character occurs in 3rd field
for eg:
file1.txt
xx|yy|xx|12
output file:
xx|yy||12 (5 Replies)
Discussion started by: rohit_shinez
5 Replies
4. Shell Programming and Scripting
hello
how can i cont number of char with loop coomand?
i dont want to use wc or other special command
the script should check all word's char. one by one
also a counter can handle the number
As noted in other threads started today. This is not the correct forum for homework assignments. ... (2 Replies)
Discussion started by: nimafire
2 Replies
5. Shell Programming and Scripting
i have a script that scans a log file every 10 minutes. this script remembers the last line of the log and then uses it to continue monitoring the log when it runs again 10 minutes later.
the script searches the log for a string called MaxClients.
now, how can i make it so that when the... (7 Replies)
Discussion started by: SkySmart
7 Replies
6. Shell Programming and Scripting
find /tmp -type f -mtime +180
I have this script get the list to clean up files older than 180 days under /tmp.
But, I want to make sure to grep only a type of files, which have only 6 character long.
....
LT3hqa dRMoya ... (16 Replies)
Discussion started by: Daniel Gate
16 Replies
7. Shell Programming and Scripting
Hi Guys,
I wand find and replace all Extended ASCII Codes from all my log files.
My Log files:
/home/Kalr/PPool/Output
i have logs file in sub dir.
/home/Kalr/PPool/Output/X
/home/Kalr/PPool/Output/Y
/home/Kalr/PPool/Output/Z
My Abc.log file input:
Extended ASCII Codes :–
... (4 Replies)
Discussion started by: asavaliya
4 Replies
8. Shell Programming and Scripting
for example:
i hav a string like :
/rmsprd/arch01/rmsprd/rmsprdarch72736.log
how I can extract
my_num=72736?
I know I can
echo "/rmsprd/arch01/rmsprd/rmsprdarch72736.log" | tr "/" " " | awk '{ print $4 }' to get rmsprdarch72736.log (4 Replies)
Discussion started by: netbanker
4 Replies
9. Shell Programming and Scripting
I wish to compute the number of dot chars in a string.
Example:
VAR="aaaa.bbbbb.cccc"
I try the shortest command to solve this test.
Thanks in advance for your help.
Regards,
Giovanni (7 Replies)
Discussion started by: gio123bg
7 Replies