Search Results

Search: Posts Made By: Orbix
2,599
Posted By Orbix
Insert Text on lines having the string word
I need help on how I can accomplish my task. I hope someone can help me since I've researching and trying to accomplish this for hours now. Basically, I need to comment-out (or insert a # sign in the...
2,805
Posted By Orbix
Remove newline & space
Can someone help me on this. I have a file that has a long line just like below. The long line keeps on being truncated to the next line (new line + space) for some reason. Basically, I just need to...
9,579
Posted By Orbix
character-by-character comparison of strings
This might be a dummy question, but is there a command in UNIX that compare two strings character-by-character and display the difference?

---------- Post updated at 11:25 AM ---------- Previous...
5,048
Posted By Orbix
Simulate CRON job
Does anyone know how I can simulate a cron job execution via UNIX scripting or is there a command/tool that simulate this?

I have a file I called "appSchedule.txt", it contains below lines:

...
2,478
Posted By Orbix
Search complicated strings on file
Can someone help me? I been figuring out how I can search and extract a complicated search string from a file. The whole string is delimited by a period. And the file where I'm searching is composed...
3,132
Posted By Orbix
OMG! Both works! I'm so happy! Hahaha! Thanks...
OMG! Both works! I'm so happy! Hahaha! Thanks frans and aigles!!!!
3,132
Posted By Orbix
Concatenate two lines in one
Does anyone know a way I can fix my file below where it has lines that are cut?

Just like the (notice the space before ms,c=PH)..

dn: cn=english,ou=Messaging,ou=lang,o=subject,t=j
ms,c=PH

...
24,380
Posted By Orbix
What about when exiting from a loop and a case?...
What about when exiting from a loop and a case? such like...

case $CASE in
1)

2)
while ps $PID
do
if [ $? -eq 0 ];then
echo "exit from this while loop and exit from...
15,248
Posted By Orbix
Thanks Franklin52 but this is the same code I...
Thanks Franklin52 but this is the same code I use. My problem really is I also need to extract those lines that contains "co-worker" in the 2nd column not just the word "worker"
15,248
Posted By Orbix
AWK seach for exact word in certain column
Can anyone help me how I will extract all lines in a file where the word "worker" or "co-worker" in 2nd column exist. There are also word in 2nd column like "workers" or "worker2" but I don't want to...
10,078
Posted By Orbix
Awk's variable in regular expression
Anyone know how I will use awk's variable in a regular expression?

This line of code of mine is working, the value PREMS should be a variable:

awk '$1 ~ /PREMS/ { if(length(appldata)+2 >=...
6,865
Posted By Orbix
Thanks a bunch! The code from pmm works but the...
Thanks a bunch! The code from pmm works but the one from Christoph Spohr did not. Im not sure why. Anyways, thanks again!
6,865
Posted By Orbix
Sorry. I forgot to mentioned that I need to put...
Sorry. I forgot to mentioned that I need to put each character in an array or variable, the reason I use the split function of awk.
30,885
Posted By Orbix
Try also cut -d, -f1 abc.txt
Try also

cut -d, -f1 abc.txt
6,865
Posted By Orbix
Awk split doesn't work for empty delimiter
Does anyone know how will I make awk's split work with empty or null separator/delimiter?

echo ABCD | awk '{ split($0,arr,""); print arr[1]; }'

I need output like:
A
B
C
D

I am under...
9,035
Posted By Orbix
It's returning an error to me. ...
It's returning an error to me.

/tmp/myscript[2]: syntax error at line 3 : `(' unexpected

The line 3 here is the ManipulateID() {

#!/bin/ksh

ManipulateID() {
some codes here
}

awk...
9,035
Posted By Orbix
Function's return value used inside awk
I have a file with the record of person:

cat > $TMP/record.txt
John Torres M Single 102353 Address
Mark Santos M Maried 103001 Address
Carla Maria F Maried 125653 Address

#!/bin/ksh...
Forum: AIX 03-11-2008
30,851
Posted By Orbix
I put the "PS1=..." command in my .profile but it...
I put the "PS1=..." command in my .profile but it didn't work when I look at the .sh_history

PS1='$(printf "%(%D %T )T" | read -s)$ '
export PS1
Forum: AIX 03-11-2008
30,851
Posted By Orbix
I put the "PS1=..." command in my .profile but it...
I put the "PS1=..." command in my .profile but it didn't work when I look at the .sh_history

PS1=....
export
Forum: AIX 03-09-2008
30,851
Posted By Orbix
timestamp in .sh_history using ksh shell
Hello Everyone:

Does anyone know how I will setup my account to put timestamp in my .sh_history? I do not hold the root account. I am using AIX 5 and ksh shell. I tried every solution I can find...
11,302
Posted By Orbix
Great! Cool. Why did I not think of using read...
Great! Cool. Why did I not think of using read inside the function?:D Hehehe. Thanks for the reply:b:
11,302
Posted By Orbix
function and pipe
Hi,

Is it possible that the output of a command is piped into a unix function? Just like in below:

#!/bin/ksh
concat(){
echo Orbix
}
echo "Hello there" | concat




How to manipulate...
11,399
Posted By Orbix
sed [delete everything between two words]
Hi,

I have the following codes below that aims to delete every words between two pattern word. Say I have the files


To delete every word between WISH_LIST=" and " I used the below codes (but...
6,700
Posted By Orbix
grep a word and display its column
Hi,

I need idea about this, say I have this line:

05 21 * * 0,6 /user/clean.desktop.sh > /tmp/desktop_rpt 2>&1

I would need to grep the word desktop and display the /user/clean.desktop.sh...
4,647
Posted By Orbix
printf and echo -n didn't work. I tried it and...
printf and echo -n didn't work. I tried it and the outcome is just the same as the above. The console ask the user for input right after the question (which is what I need) but the choices are...
Showing results 1 to 25 of 39

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