Search Results

Search: Posts Made By: learning_skills
2,337
Posted By learning_skills
Hi Scottn, I am using ksh: $ echo...
Hi Scottn,

I am using ksh:

$ echo $SHELL
/bin/ksh
2,337
Posted By learning_skills
Thanks for the reply Scottn !! I tried the...
Thanks for the reply Scottn !!

I tried the same:
printf "$n%400s" >> file.txt

Although it is inserting the required number of spaces in file.txt, it also gives the message:
printf: 400s:...
2,337
Posted By learning_skills
Inserting spaces after a value in UNIX
Hi All,

I need to prepare a shell script in UNIX to insert 400 spaces after a variable in a file "file.txt".

Eg. if n=T12345
echo $n >> file.txt

cat file.txt should give:
T12345<400...
7,486
Posted By learning_skills
Inserting spaces after a variable
Hi All,

I need to insert 400 spaces after a variable in a file.
Eg. if n=T12345
echo $n >> file_name
I need to insert 400 spaces after n in the file "file_name".

Please advice.

Thanks...
7,486
Posted By learning_skills
Increment of a variable
Hi All,

I have a variable n that stores a number.
Eg. echo $n comes out to be 120.

I need to print 121 using echo command on n.
Please advice.

Thanks in advance !!
1,464
Posted By learning_skills
Replacing '-' by 0 in a file
Hi,

I have the following data in my file (file.csv):

My.com,21 September 2009,ace,42,0,0,0,-,-
My.com,21 September 2009,adb,3,0,0,0,-,-
My.com,21 September 2009,agp,3,0,0,0,-,-
My.com,21...
Showing results 1 to 6 of 6

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