Search Results

Search: Posts Made By: Arun_Linux
1,130
Posted By Arun_Linux
How to get next string of a matching string?
fruits="apple grape orange jack lemon"

I want the element present next to "orange". i.e. jack
Note: The position of orange is not fixed.

fruits="apple grape orange jack lemon"

echo $fruits...
6,453
Posted By Arun_Linux
cat /usr/local/data/sales/taxware/indata/stepprod...
cat /usr/local/data/sales/taxware/indata/stepprod |wc -l | xargs echo stepprod
51,798
Posted By Arun_Linux
i=0; for j in `cat test.txt` do ...
i=0;
for j in `cat test.txt`
do
array[$i]=$j;
#do manipulations here
i=$(($i+1));

done
echo "Value of third element in my array : ${array[3]} ";

or if you want to read it...
4,323
Posted By Arun_Linux
you can do this using sed, sed -e...
you can do this using sed,

sed -e 's/\(.......\)\(.\)\(.\)/\1\3/' inputfile.txt
2,250
Posted By Arun_Linux
Shell script to accept user input on the fly
I want a shell script that accepts user input simultaneously when performing other tasks. Example: A shell script should echo some messages on the console and when the user presses some keys it...
2,402
Posted By Arun_Linux
Im not good at awk, you can try to loop through...
Im not good at awk, you can try to loop through the files such that the awk command takes one file at a time.
else try this,

cat *.csv | awk -F"," ' $14 ~ /6010|2345|5690|8670|4567/ { print $0 ;...
1,637
Posted By Arun_Linux
Many thanks... It works perfectly... tested on...
Many thanks... It works perfectly... tested on both solaris and linux :-).
1,637
Posted By Arun_Linux
Pamu: Its throwing error.. bash-3.00$ awk...
Pamu: Its throwing error..

bash-3.00$ awk -F, 'NR==FNR{for(i=1;i<=NF;i++){A[i,FNR]=$i};next}{for(i=1;i<=NF;i++){if(A[i,FNR]!=$i){print A[i,FNR],"(line "FNR","i" Column) in file1 does not match...
1,637
Posted By Arun_Linux
Command to show unique strings in two files
how to display the unique strings in two files using shell script or commands.
I tried diff and cmp but it shows the entire line, i need only the mismatched strings.

File1:
sat,sun,mon,tue...
918
Posted By Arun_Linux
Try this: while read line do echo...
Try this:

while read line
do
echo compressing $line
gzip -f $line
done < mycompress.tmp
Forum: IP Networking 12-17-2012
4,626
Posted By Arun_Linux
I can see my local IP in my windows using...
I can see my local IP in my windows using ipconfig.
Question is: Why my server isnt displaying the local ip address ('who' command) when i use remote sessions in xterminal, but when i use putty it...
Forum: IP Networking 12-17-2012
4,626
Posted By Arun_Linux
So you mean it is not possible to get the local...
So you mean it is not possible to get the local ip address?
But I am able to get the local ip address when I login using Putty, whats going wrong when I use xterminal (Netsarang's Xclient)
...
Forum: IP Networking 12-17-2012
4,626
Posted By Arun_Linux
I tried your commands, that too doesnt help me.. ...
I tried your commands, that too doesnt help me..

ss_cc@MGTS5026-13sh1:~> who -a
2012-09-20 10:26 922 id=si term=0 exit=0
run-level 5 ...
Forum: IP Networking 12-17-2012
4,626
Posted By Arun_Linux
How to know local IP address in X-Terminal?
Im using a X-Terminal in my windows pc to connect to a Linux server.
Is there a way to know my local IP address in my x-terminal console?

Here are few commands which didnt help me:
...
1,926
Posted By Arun_Linux
Is it possible to change my username?
I know username is the unique id for my unix_dot_com account, but is it possible change it ? should i raise any special request to moderators ?
10,383
Posted By Arun_Linux
ssh hungs because the invoked processes are still...
ssh hungs because the invoked processes are still running.
You can use fork option:

ssh -f user@remotehost "${GETT_HOME}/bin/start1 & sleep 10; ${GETT_HOME}/bin/start2 & sleep 10;...
13,893
Posted By Arun_Linux
elixir_sinari: Finally your answer...
elixir_sinari:
Finally your answer is much convincing.. I read the link, good explanation. But still I wonder why ctrl-c is ignored since i'm not handling any traps to capture the signals.
13,893
Posted By Arun_Linux
elixir_sinari: here's the output bash-3.00$...
elixir_sinari: here's the output

bash-3.00$ stty -a
speed 38400 baud;
rows = 37; columns = 190; ypixels = 0; xpixels = 0;
csdata ?
eucw 1:0:0:0, scrw 1:0:0:0
intr = ^c; quit = ^\; erase =...
13,893
Posted By Arun_Linux
Here's copy paste of my window... bash-3.00$...
Here's copy paste of my window...

bash-3.00$ c=0
bash-3.00$ test_loop() {
> c=$(($c+1))
> echo "count value is : $c "
> sleep 1
> test_loop
> }
bash-3.00$ test_loop...
13,893
Posted By Arun_Linux
bmk: when I execute the code in command line it...
bmk: when I execute the code in command line it isnt responding, but when i put in the script im able to bring it down by pressing ctrl+c. So your suggestion aint working for me.

---------- Post...
13,893
Posted By Arun_Linux
How to stop infinite loop
Im unable to stop the below infinite loop (bash script). Can someone tell me why this isnt responding to signals eg: ctrl+c (SIGINT) or ctrl+z

c=0
test_loop() {
c=$(($c+1))
echo...
1,681
Posted By Arun_Linux
Every time the loop runs, it creates the tar file...
Every time the loop runs, it creates the tar file in the same name (backup.tar.gz) thus over writing the previous one, hence it ends up only with the last tared file.
The tar command in your while...
Forum: Web Development 10-12-2012
3,485
Posted By Arun_Linux
graphicsman: It will be of great help if you...
graphicsman: It will be of great help if you could share me the book list. TIA.

Corona688: Whats your recommendation on open source CMS ?
1,316
Posted By Arun_Linux
Thanks vpundit, that answered my first two...
Thanks vpundit, that answered my first two questions..
1,316
Posted By Arun_Linux
what is a file ?
I have few basic doubts about files

1) Windows recognizes file by its extension like (.txt , .csv). How does unix/linux do it ?


2) How does file editor capable of editing various file...
Showing results 1 to 25 of 92

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