Search Results

Search: Posts Made By: rujuraha
3,364
Posted By rujuraha
Try this - sed -e 's/[ ]\{1,\}0/ /g' file ...
Try this -

sed -e 's/[ ]\{1,\}0/ /g' file

Within the square blocks there are a space and a tab. Type the tab character as <Ctrl>V <TAB>.
15,666
Posted By rujuraha
echo $? will give you the result of the last...
echo $? will give you the result of the last command you have executed. If it is 0 then the command is successful and if it is 1 then the command had failed.
22,298
Posted By rujuraha
awk '/disconnect/ { getline; print $0;}'...
awk '/disconnect/ { getline; print $0;}' <inputfile>
5,639
Posted By rujuraha
You can use the 'top' command It will display...
You can use the 'top' command
It will display the output in the following way -
PID PSID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND
1421 1378 rawalm 1 18 0 ...
2,078
Posted By rujuraha
Here is the code - awk -F ' ' '$3 ~ /^M.+/...
Here is the code -

awk -F ' ' '$3 ~ /^M.+/ { gsub( "M", "m", $3); print; }' <file name>
3,534
Posted By rujuraha
Hi alobi, Here is the script - num=$# ...
Hi alobi,
Here is the script -

num=$#
option=$1
typeset -R2 lastday=$(cal)
currdate=`date "+%d"`
days_to_go=`expr $lastday - $currdate`
hrs_gone=`date "+%H"`
mins_gone=`date "+%M"`...
7,153
Posted By rujuraha
Could you please elaborate more on the criteria...
Could you please elaborate more on the criteria you want to use to split the file ?
5,969
Posted By rujuraha
set PS1 variable like this - PS1="$PWD !$"...
set PS1 variable like this -

PS1="$PWD !$"

This will set your prompt like this -

<path of the current dir you are in> <line number>$

e.g:
/ms/user/r/rujuraha/exercise 12$
2,791
Posted By rujuraha
Here is the code cat filename | awk ' /ftp...
Here is the code
cat filename | awk '
/ftp SERVER/{ print $0;
i = 1;
while ( i < 3 )
{ getline;
print $0;
i++;
...
1,831
Posted By rujuraha
tail -1 filename | grep 'END OF FILE' If...
tail -1 filename | grep 'END OF FILE'

If the the string is found in the last line then the last line will be displayed else no result is displayed.
Showing results 1 to 10 of 10

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