Search Results

Search: Posts Made By: napolayan
1,806
Posted By napolayan
indenting lines to the left
hi

i have a file which is like this :

aab ghj
ghj lsklk
lklkl;
ashjd
kjs
alskj

How do i remove the spaces from the beginning of a line so that all lines are indented to the...
10,066
Posted By napolayan
find -perm query
I was going through a find tutorial and just couldn't get it...can someone explain it like he/she would explain a brain damaged dodo?

"find allows you to specify a pattern that can be bit-wise...
17,721
Posted By napolayan
i am using the bash shell by the way. solaris
i am using the bash shell by the way. solaris
17,721
Posted By napolayan
The following is a segment from that post. ...
The following is a segment from that post.
"There is a command called [ and like many commands it takes parameters. It checks its last parameter and gets mad unless it is ]. If the last parameter is...
17,721
Posted By napolayan
why put double square brackets in an if clause?
what is the rationale behind putting double square brackets in an if clause?

for e.g.

if [[ ${APPNAME} = '' ]] || [[ ${SRCSYSNAME} = '' ]] || [[ ${FILENAME} = '' ]];
then
echo some fields are...
5,914
Posted By napolayan
the test error is probably because the wc command...
the test error is probably because the wc command displays its output separated by 7 spaces from the start of the line. so when u do cut -c1,2, only the first 2 columns are getting selected which are...
4,988
Posted By napolayan
then simply add this to anbu's code cat...
then simply add this to anbu's code
cat filename|while read line
do
echo $line|awk '{print $7}'|sed "s/\(.\{4\}\)\(..\)\(..\)\(..\)\(..\)\(..\)/\3-\2-\1 \4:\5:\6/">>filename2
done
9,884
Posted By napolayan
umm..how abt this? awk '/$1/' inputfile>temp...
umm..how abt this?

awk '/$1/' inputfile>temp

awk '{for ( $0 in `cat temp` )
key[$0]++
if(key[$0] < 2 ) print $0
}' inputfile > outputfile


i didnt try this out, but i hope the logic is...
1,536
Posted By napolayan
the default field separator is space and the...
the default field separator is space and the default record (line) separator is the newline character. Now, if u remove the record separator and put the field separator as the newline character, then...
4,454
Posted By napolayan
thanks! after a cloudy day, its a sunny one again!
thanks! after a cloudy day, its a sunny one again!
1,536
Posted By napolayan
What does .)1 do?
Hi!

Can someone tell me what does the '.)1' (highlighted in bold and between the two awk scripts) do? Guess it connects the two scripts but what is the reason or logic behind this syntax?

...
4,454
Posted By napolayan
Thanks! it worked. But why didnt awk work? coz...
Thanks! it worked. But why didnt awk work? coz the tutorial was written for Awk, not nawk. The tutorial was for Solaris n my flavor is also Solaris. It was written in 1989 tho - did that make any...
4,454
Posted By napolayan
Setting FS to more than one character
Hi!

In an awk tutorial i was reading (from www.grymoire.com), it was mentioned that i can set the input field separator to more than one character using FS. However when i tried it out, it wasnt...
Forum: Open Source 10-26-2006
339,540
Posted By napolayan
can you or anybody tell me how to make backspace...
can you or anybody tell me how to make backspace work in vi? when i press backspace, it simply moves one place to the left.
12,404
Posted By napolayan
slire, Its not possible to get the file...
slire,

Its not possible to get the file creation date in UNIX. Thats the answer i have got after going thru the threads on this topic. The only things u can get are time of last modification n...
1,527
Posted By napolayan
as for the time at which the command was...
as for the time at which the command was executed, i really dont know... sorry
1,527
Posted By napolayan
use the script command $ script logfile ...
use the script command

$ script logfile

..
...set of commands
...

$ exit

it will store all the commands u hv typed in logfile. tho it doesnt store commands like vi properly
3,258
Posted By napolayan
hmmm...i'll chk it out n let u know...am also a...
hmmm...i'll chk it out n let u know...am also a newbie :)
3,892
Posted By napolayan
hi vgersh99 can u plz explain ur code? ...
hi vgersh99


can u plz explain ur code? for a newbie, its difficult to understand the latter half of the code..
3,892
Posted By napolayan
clarify a few things...the data u'll be inserting...
clarify a few things...the data u'll be inserting will be in a file? n the no. of rows in that file is equal to the no. of rows in the file to which u wanna insert?

i mean, if u have 10 rows in...
3,258
Posted By napolayan
hey the option is not -1, its -l (el)...use...
hey the option is not -1, its -l (el)...use it...it'll work fine

for the second part, after >existentfiles, type 2>nonexistentfiles it will send the error output to nonexistentfiles
10,094
Posted By napolayan
ls -l|while read line do awk '$5 != 0 {print...
ls -l|while read line
do
awk '$5 != 0 {print $0}'
done>file1


$5 is the fifth field in output of ls - l which gives the no. of characters in the file. so i hv written all the files which dont...
8,311
Posted By napolayan
just remove the spaces in each line using sed ...
just remove the spaces in each line using sed

cat file|while read line
do
sed 's/ //'
done>output_file
110,253
Posted By napolayan
try out fg %<name of process> eg ...
try out

fg %<name of process>

eg

fg %sort will bring the background process sort into the foreground
4,199
Posted By napolayan
plz give the complete script, n plz copy paste...
plz give the complete script, n plz copy paste it. closing back-quotes are missing in the script. what do u want the for loop to do?

ls 1 /appl/CH_DATA/archive/CACHE/CDBACKUP$name*.archived
...
Showing results 1 to 25 of 41

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