Search Results

Search: Posts Made By: tprabhaker
9,045
Posted By tprabhaker
Thanks a lot, it's woks perfectly, can you please...
Thanks a lot, it's woks perfectly, can you please explain about the following code.
OLDIFS="$IFS"
IFS="|"
set -- $line
IFS="$OLDIFS"
9,045
Posted By tprabhaker
AWK FS with ignore space option
Hi,
i have in a situation to get the variables which are having a "|" delimiter and each variable may or may not have spaces, so how can i skip the spaces on the string and print the string as it...
17,795
Posted By tprabhaker
Excellent!!! It's working , thanks alot UNIX...
Excellent!!!
It's working , thanks alot UNIX Forums.

Here is the modified code.
echo "HOSTNAME1:" "$HOSTNAME1" | awk -v var="Everyone" '{printf("%- 12s %- 40.40s %s\n",$1,$2,var)}'
echo...
17,795
Posted By tprabhaker
Thanks for your reply.... I don't know the...
Thanks for your reply....
I don't know the length of the second field, all data is coming dynamically, is there a way i can print 3 field starting from 50th location towards right, doesn't matter...
17,795
Posted By tprabhaker
awk to print fixed length columns to right side
Hi,
I am in a situation to print the message on a column, where the each line starting position should be same.

For example code:
HOSTNAME1="1.2.3.4.5.6.7"
TARGET_DIR="/tmp"
echo...
Showing results 1 to 5 of 5

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