Try this to get the concept...
Output
It will shift the arguments from right to left
Lets say, you have 3 arguments i.e. $1=a, $2=b, $3=c
Now you "shift" and try priting $1, it will print "b" and $2 will be "c" and there will no $3
There is an error when i am trying to use the shift command in this way:
($1 = -d, $2 = 123, $3 = -c etc etc)
for $arg in $@
do
case $arg in
"-d") shift; (so that the $2 will become the $arg now)
(and while it loop the 2nd time,)
... (1 Reply)
hi all, when I press SHIFT at once it work like as
I've hold it (like CapsLock is On, but it Off) ! ... and if I press F1 (or another
function key) it put out 24z :(
it is occure on my remote sun 8 , xterm session
help me please ! (2 Replies)
Hi Folks,
In shell scripting the maximum no. of command line parameters becomes 9(Am i right). If we want to get more than 9 parameters we use the shift command.
Even here there are two possibilities.
1. Without the use of variables - The arguments are lost and the lost no. is equal to the... (6 Replies)
I am running a program where in I have this command
which is giving error the shift: number is not correct.
can you please tell me how shift actually works?
the line which is giving error is-
set $PARAM; shift; shift; shift; shift; shift; shift; shift; shift
Is it related somewhere to... (2 Replies)
Hi,
I wrote one script, in between script needs to use 10th and 11th positional parameters, that time i used "shift". Here i am facing the below find problem,
./DataCount.sh: cannot shift
I tried
1) I have read man pages for shift
2) Before but * and **
3) Simple shift with out giving... (4 Replies)
I would need the awk command or a better way to get my file that looks like
1234
5678
8912
3456
7890
to look like
1234,5678,8912,3456,7890
Thanks in advance (4 Replies)
Hi,
Firstly, I did a search for this question both on this site and on the internet and have not been able to find a suitable answer that is not general in nature.
I have always been a Windows user. I use my girl friend's mac every now and then, but I always come back to windows. For a... (1 Reply)
think using shift would help me finish my script but cant get it work without your help. would appreciate if you give me a example with shift & counter in the same script so I can later work on that to my one.
Thanks and Good Luck! (1 Reply)
Hello,
I am reading one of the AIX manuals about shell scripting and (AIX 5) and I found this example when introducing to functions:
function usage
{
prog="$1"; shift
print -u2 "$prog: usage: $prog $@"
exit 1
}
This example is meant to be easy but I don't understand what it is... (5 Replies)
#!/bin/bash
hostname=$1; shift
for hostname in $1
do
ping $hostname
done
I want to run the above script as hostname.sh yahoo.com google.com cnn.com. I want to shift each hostname to $1. How can do that with above code as currently it's not shifting. (5 Replies)
Discussion started by: scj2012
5 Replies
LEARN ABOUT SUNOS
jistosj
jistoeuc(1) User Commands jistoeuc(1)NAME
jistoeuc, jistosj, euctojis, euctosj, sjtojis, sjtoeuc - Code conversion between JIS, PC kanji, and Japanese EUC
SYNOPSIS
jistoeuc [-8] [-U] [filename...]
jistosj [-8] [-U] [filename...]
euctojis [-8] [-U] [filename...]
euctosj [-U] [filename...]
sjtojis [-8] [-U] [filename...]
sjtoeuc [-U] [filename...]
AVAILABILITY
SUNWjfpu
DESCRIPTION
For Japanese language handling, the jistoeuc family provides conversion between different code standards. command [ filename ...] does the
specified conversion on the contents of the input filenames and writes it to stdout.
If filename is not given, it reads and converts characters from the standard input.
jistoeuc converts JIS to Japanese EUC
jistosj converts JIS to PC kanji
euctojis converts Japanese EUC to JIS
euctosj converts Japanese EUC to PC kanji
sjtojis converts PC kanji to JIS
sjtoeuc converts PC kanji to Japanese EUC
OPTIONS -8 With this option specified, the commands jistoeuc, jistosj, sjtojis, and sjtoeuc, can support JIS X 0201 (Half-Size Katakana).
This 8-bit JIS code does not use ISO Shift-In and Shift-Out escape sequences.
-U The output is not buffered (The default is buffered output).
SEE ALSO iconv(1), iconv_ja(5)NOTES
This command can handle shift-in escape sequences for the following character sets:
JIS X 0208 shift-in escape - E$B, E$(B, E$@
JIS X 0212 shift-in escape - E$(D
JIS X 0201 Roman shift-in escape - E(J, E(H
ASCII shift-in escape - E(B
euctojis and sjtojis can handle shift-in escape sequences for the following character sets:
JIS X 0208 shift-in - E$B
JIS X 0212 shift-in - E$(D (except when sjtojis command is specified)
JIS X 0201 Roman shift-in - E(J
jistoeuc does not check whether or not each code in the input file is correct. Conversion with PC kanji is not based on TOG Japanese Ven-
dors Council (TOG/JVC) Recommended Code Set Conversion Specification between Japanese EUC and Shift-JIS. The iconv(1) utility provides
these functions. See iconv(1) and iconv_ja(5) for more information.
BUGS
If JIS X 0212 character set is specified as input, jistosj and euctosj can not support the conversion correctly. euctosj, sjtoeuc, jis-
tosj, and sjtojis can support conversion correctly only if JIS X 0208 1 ku - 84 ku is specified as input.
SunOS 5.10 10 Jan 2003 jistoeuc(1)