Search Results

Search: Posts Made By: simpltyansh
2,508
Posted By simpltyansh
Hi Ravinder, I used below code and it...
Hi Ravinder,

I used below code and it removed all the NULL characters.

cat file1 | awk '{sub(/[^[:digit:]]*/,"");print}' >> file2

Need urgent help.
2,508
Posted By simpltyansh
Remove first NULL Character in Flat File
We have a flat file with below data :

^@^@^@^@00000305^@^@^@^@^@^@430^@430^@^@^@^@^@^@^@^@^@09079989530As we can see ^@ is Null character in this file
I want to remove only the first few null...
3,197
Posted By simpltyansh
Hey Radioactive, Am sorry, it would give same...
Hey Radioactive,
Am sorry, it would give same result as before.
$ ps -ef|grep -Eo 'process1|process2|process3| '|grep -v grep |sort | uniq -c | awk '{print $2": "$1}'
: 108766
process1: 1...
3,197
Posted By simpltyansh
Unfortunately my system doesn't support pgrep....
Unfortunately my system doesn't support pgrep. :confused:
3,197
Posted By simpltyansh
Check Running Processes
I want to check how many processes are running with same names and get their respective counts.

ps -ef|grep -Eo 'process1|process2|process3| '|sort -u | awk '{print $2": "$1}'

Output would...
1,225
Posted By simpltyansh
How to echo a value of a var stored in another variable?
I'm writing a shell script in AIX and using ksh.

I have a scenario where I have a variable A which stores $B.
so when i echo "$A" it prints $B

But I wish to print value stored in var b ie. ...
1,134
Posted By simpltyansh
Does min.h.bak mean the filename in your...
Does min.h.bak mean the filename in your suggestion ?
1,134
Posted By simpltyansh
Finding latest file in dir but getting syntax errors
I believe there are couple of syntax issues in my script, couldn't find them :(
can someone help me with fixing it to make it work.

cd /abcde/
#get the latest filename excluding subdirs...
4,020
Posted By simpltyansh
I checked it already, but couldn't find the...
I checked it already, but couldn't find the appropriate answer to it.
Could I please find an answer to this ?
4,020
Posted By simpltyansh
Find hours difference between two dates in given format
I have two dates in below format, how would I find the hours difference between the two dates. Im using AIX and ksh.

Current date : Wed May 17 14:34:41 SGT 2017
File date : Thu Apr 27 20:52:41...
5,820
Posted By simpltyansh
Using AIX and KSH ---------- Post updated at...
Using AIX and KSH

---------- Post updated at 02:24 PM ---------- Previous update was at 08:12 AM ----------



Hi Rudi,

Can you help me with the complete script, I didn't get your solution.
5,820
Posted By simpltyansh
Send email if latest file in a directory is older than 2 hours
I have a objective of Sending email if latest file in a directory(excluding files of sub-dirs) is older than 2 hours.

eg : ls -ltr
drwx--x--x 2 abcde abc 256 2017-02-07 20:10 Mail
-rw-rw-r--...
813
Posted By simpltyansh
Thanks guys. Appreciate it. :)
Thanks guys. Appreciate it. :)
813
Posted By simpltyansh
Query on fetching a value of variable in script
I have below 3 files in a directory :

oktest.txt
okcode.txt
okfun.txt


I was writing a small shell script to just print the names of three files where I took a variable a and assigned it a...
Showing results 1 to 14 of 14

 
All times are GMT -4. The time now is 08:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy